Skip to content

Commit

Permalink
type(SearchTree): fix type error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 19, 2023
1 parent 2efe580 commit d31ca18
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/react-search-tree/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,6 @@ function SearchTree<V extends SearchTagInputOption>(props: SearchTreeProps<V>) {
onChange?.(cur, resultValue, isChecked);
};

// 防抖
const debounce = (fn: Function, ms: number) => {
let timeoutId: NodeJS.Timeout;
return (searchValue: string) => {
onSearch?.(searchValue);
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
fn(searchValue);
}, ms);
};
};

const selectedSearch = (searchValue: string) => {
const hiddenNodeForSeach = (childrens: TreeData[], parentIsHide: boolean = true) => {
childrens.forEach((child: TreeData) => {
Expand Down

0 comments on commit d31ca18

Please sign in to comment.