question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I could not find what I was looking for - this.state.refine locks up page...

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marc-wilsoncommented, Nov 20, 2017

@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.

1reaction
marc-wilsoncommented, Nov 17, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access state outside the lifecycle - Algolia
Refining a search from the outside# Found an issue? In InstantSearch, the refinementList widget controls refinements for a given attribute. You ...
Read more >
algolia - Property 'refine' does not exist on type 'object'
I've copied the BaseWidget.d.ts from the Angular Instant Search node modules folder. As for the path of connectors, I've provided a little info, ......
Read more >
NetSuite Applications Suite - Error Status Codes
On the saved search form, click the "Email" tab, check "Send According to ... The Payable Tegata is no longer in Issued state...
Read more >
Search your notes on iPhone - Apple Support
If a note is locked, only its title appears in the search results. The search includes handwritten text (in supported languages), photos, and...
Read more >
Reading 23: Locks and Synchronization - MIT
The correctness of a concurrent program should not depend on accidents of timing ... ensuring that the owner of a lock is always...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found