I could not find what I was looking for - this.state.refine locks up page...
See original GitHub issueI am using algolia in my Angular 5 application and everything is working perfectly. I chose to work with the connectors rather than using the out of the box components.
However, what I find very strange is that when I’m working with the refinersListConnector or the searchBoxConnector, the function to be called to apply the search/refiner isn’t asynchronous.
Following the documentation: https://community.algolia.com/instantsearch.js/v2/guides/angular-integration.html
For example:
In the documentation, you have a piece of code that updates the query:
handleChange(query) {
this.state.refine(query);
}
Then you state:
…We will use Angular data binding to update the query and call this.state.refine() function every time the input value changes:
Now, the result I get is exactly what I am expecting. However, the user experience is less than favorable because the page locks up after a user enters a single key. I have set a min char count of 3 so that the results can be narrowed down more and thus lowering the page lock-up time, but it still isn’t good. It’s quite annoying to have this issue for the refiners and especially the search box.
Is there any future plans or current functionality that would get me around this page lockup issue? I was hoping that this.state.refine
would return a promise or something, but it doesn’t.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
@bobylito Thanks for providing the information. If the function is non-blocking than I will have to look at what else is blocking it. I will also try the helper to see if that gives me what I want.
It’s following the documentation step by step. If you follow the documentation in the Angular2 + Instasearch, you’ll be able to see the issue.