I made some changes in main code, including a debouce to delay to call the method searchedItems, and a fix that solves the problem of not showing first-time searched items if user types a little fast.
Hope this code snippet can be helpful to someone.
I made some changes in main code, including a debouce to delay to call the method searchedItems, and a fix that solves the problem of not showing first-time searched items if user types a little fast. Hope this code snippet can be helpful to someone.
... ... searchedItems = searchedText => { let {setSort} = this.props;
};
callSearchedItems = text => { clearInterval(this.typeWait);
};
renderTextInput = () => { ... ... { key: 'onTextChange', val: text => { this.callSearchedItems(text); }, },