react-component / tree-select

React Tree Select
https://tree-select.react-component.now.sh/
MIT License
289 stars 190 forks source link

How to use debounce lodash in search #235

Open hungdev opened 4 years ago

hungdev commented 4 years ago

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!

hungdev commented 4 years ago

@afc163

tomkp75 commented 3 years ago

Hi is there a plan to add a debounce option for the search? Thanks!

DevinXian commented 1 month ago

Any progress ?