Open
Conversation
Owner
|
This seems fine in principle. Can we use rest arguments to make the debouncer more concise? function debounce(f, wait){
var timeout;
return function(...args) {
clearTimeout(timeout)
timeout = setTimeout(f.bind(this, ...args), wait);
}
}Also instead of var filterProjectsBySearch = debounce(function(query) {
...
}, 100); |
Contributor
Author
|
I've applied the rename suggestion. The downside to using spread is that Internet Explorer support is non-existent. Is Internet Explorer support still a goal for clojure-toolbox? |
Owner
I don't believe it's ever been a goal. If someone needs IE support and raises an issue then we can revisit this, but I think it's safe to assume IE use amongst Clojure programmers is low to non-existent. |
This makes the UI feel far less laggy while typing in a search query. It avoids applying redundant searches, which can easily add up to ~150ms per character on an older device or mobile phone.
Contributor
Author
|
As that's the case, I've pushed a shorter implementation using ES6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the UI feel far less laggy while typing in a search query.
It avoids applying redundant searches, which can easily add up to ~150ms
per character on an older device or mobile phone.