Skip to content

Commit d31ca18

Browse files
committed
type(SearchTree): fix type error.
1 parent 2efe580 commit d31ca18

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

packages/react-search-tree/src/index.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,6 @@ function SearchTree<V extends SearchTagInputOption>(props: SearchTreeProps<V>) {
125125
onChange?.(cur, resultValue, isChecked);
126126
};
127127

128-
// 防抖
129-
const debounce = (fn: Function, ms: number) => {
130-
let timeoutId: NodeJS.Timeout;
131-
return (searchValue: string) => {
132-
onSearch?.(searchValue);
133-
clearTimeout(timeoutId);
134-
timeoutId = setTimeout(() => {
135-
fn(searchValue);
136-
}, ms);
137-
};
138-
};
139-
140128
const selectedSearch = (searchValue: string) => {
141129
const hiddenNodeForSeach = (childrens: TreeData[], parentIsHide: boolean = true) => {
142130
childrens.forEach((child: TreeData) => {

0 commit comments

Comments
 (0)