Open polkabrothers opened 3 years ago
@polkabrothers Did you notice this issue in your app, or did you only see it on the recipe search site? If it's the latter, it's actually a side-effect of how I've implemented the search on that site. It's on my todo list to fix, but it's not directly related to this adapter.
Possibly related: doing this in the main search input will not remove the first character in the url query string
@jasonbosco This happens in my app as well.
There are any news about this issue?
I took a look at this, but I don't think is related to the typesense instantsearch adapter. This seems like an issue in instantsearch itself. For eg, if you press backspace and delete one character at a time then this issue doesn't happen. So this suggests to me that there is some race condition in the event handler inside instantsearch where it fires off multiple parallel calls and then uses whatever call returns last (even if its out of order) to render the UI state, when instead it should probably serialize the requests, or cancel a request that's in-flight before initiating a new search request from this widget.
I've tried with any example at this page: https://typesense.org/docs/overview/demos.html and even deleting one letter at time or using only one letter the issue persists.
The issue isn't present on the example in typesense homepage https://typesense.org/
Hmm, here's a screengrab showing the issue happening initially when I hold down the backspace key, and then not happening when I delete one character at a time:
https://user-images.githubusercontent.com/458383/152605080-dae928d1-8598-4800-bcad-899a9d05d590.mov
Or at least this is what I understood of the issue. Is this the same issue you're experiencing as well?
I was referring about the main search box, where you searched "pizza"
Hmm, that's potentially a different issue then. Could you open a separate Github issue describing the exact issue you're seeing?
This issue was originally only related to searching within the search box in the refinementList.
Description
When using a searchable refinementList and using search inside the facet widget to filter results, the first character is not cleared if holding backspace, removing characters one at a time works though.
Example from: https://recipe-search.typesense.org/
Steps to reproduce
Go to https://recipe-search.typesense.org/ Search for something Type something in the filter ingredients facet search Hold backspace to remove facet search string completely