-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add search throttling and min search text length options #117
Comments
Hi! Currently the search is already throtted, but the As of min search string length limit, that would be helpful and I'll add this option. But most importantly, I'll be continously optimizing the rendering performance, which is the root cause of the problem. |
v0.0.31 just came out with a new async searching feature. I recommend you to try it out! Then it should be much smoother. |
本地搜索 INPUT_DEBOUNCE_DELAY 可以配置吗 |
Async searching needs a debounce setting, it will call loadOption function immediately now. *** At now, I use lodash debounce to solve this problem. *** onQueryChange({ action, searchQuery, callback }) {
if (action === ASYNC_SEARCH) {
this.handleSearchQueryChange(searchQuery, callback);
}
},
handleSearchQueryChange: _.debounce(async function(query, callback) {
var response = await loadDataFromServer(query);
callback(null, response);
}, 500), |
Hello. I have a large nested list (80000 items) and everything works fine until you try to search for something. When you start typing first letter of the word into search box, browser freezes for ~30 seconds and it happens with every consecutive letter until you reach like 4th character. What I think could solve this problem is an option to set throttling to like 1s and also cancel search if the search string is less than N number of chars.
The text was updated successfully, but these errors were encountered: