Skip to content

Commit 3aa781a

Browse files
committed
delete console
1 parent 09d45f9 commit 3aa781a

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

chat2db-client/src/blocks/Tree/index.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ const isMatch = (target: string, searchValue: string) => {
5858
function searchTree(treeData: ITreeNode[], searchValue: string): ITreeNode[] {
5959
let result: ITreeNode[] = [];
6060
function dfs(node: ITreeNode, path: ITreeNode[] = []) {
61-
console.log(node.name, searchValue, isMatch(node.name, searchValue));
6261
if (isMatch(node.name, searchValue)) {
6362
result = [...result,...path, node];
6463
return true;
@@ -72,8 +71,6 @@ function searchTree(treeData: ITreeNode[], searchValue: string): ITreeNode[] {
7271

7372
treeData.forEach((node) => dfs(node));
7473

75-
console.log(result,'result')
76-
7774
result.forEach((item) => {
7875
if(!isMatch(item.name, searchValue)){
7976
item.children = null;
@@ -128,7 +125,6 @@ const Tree = (props: IProps) => {
128125
useEffect(() => {
129126
if (searchValue && treeData) {
130127
const _searchTreeData = searchTree(cloneDeep(treeData), searchValue)
131-
console.log(_searchTreeData)
132128
setSearchTreeData(_searchTreeData);
133129
} else {
134130
setSearchTreeData(null);
@@ -142,7 +138,6 @@ const Tree = (props: IProps) => {
142138
<div
143139
className={classnames(styles.scrollBox)}
144140
onScroll={(e: any) => {
145-
console.log(e.target.scrollTop);
146141
setScrollTop(e.target.scrollTop);
147142
}}
148143
>

0 commit comments

Comments
 (0)