react-component / react-component/tree-select
How to use debounce lodash in search
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 312
- Forks
- 204
- Avg merge
- 37m
- Merged PRs (30d)
- 1
Description
im using filterTreeNode props and func is:
filterFunction = (input, treeNode) => {
const compare1 = treeNode.props.title.toLowerCase();
const compare2 = input.toLowerCase();
return compare1.indexOf(compare2) >= 0;
};
But it always trigger when i type something to search, when i have large data, it will response slowly. So i want to use debounce (lodash) to handle trigger filter. Could you tell me how to use it.
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named; the issue asks how to debounce the filterTreeNode search callback with lodash. Start by checking the component's search API and existing usage documentation, then document a clear debounce example and how to verify it with large tree data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100