Issues search is run on any keyup, even if search terms remain the same
For example, if you try copy/pasting the text from the search field or, more commonly, moving the cursor within the search field using arrow keys. Or just stray key strokes (Shift, Caps Lock) that don't have any direct bearing on the search input. As it is, each keyup event initiates a new search and page reload. This should only occur when the search terms have actually changed.
A couple related issues:
- When you edit the field to be empty, for example, if you want to return to not filtering search terms, there is no way to easily do so (even by hitting enter).
- The search field loses focus every time search is executed
Possible resolutions:
We could make the search a little smarter, for example using dirty
, clean
, fresh
and stale
flags to more appropriately respond to input. As such logic could become complex to track, and given that the trips to the server are messing up focus, this may be a good candidate for refactoring in Vue.js.
cc: @jschatz1