Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

The response should treated with the same parameters used for the request #31

Closed
bobylito opened this issue Apr 1, 2015 · 1 comment
Milestone

Comments

@bobylito
Copy link
Contributor

bobylito commented Apr 1, 2015

If you make programmatically make two request with the helper, the first response will use the state of the second request.

Example :

helper.clearDisjunctiveRefine( "facet", "value1" );
helper.addDisjunctiveRefine( "facet", "value2" );

This will end up in the clear response to be treated as if there was a refinement expecting a second request.

Workaround : use the 'holdSearch' flag to keep the helper from doing two requests

helper.clearDisjunctiveRefine( "facet", "value1", true );
helper.addDisjunctiveRefine( "facet", "value2" );

Possible fixes :

  • bind the state to the callback. Because the state is immutable (in theory), each state is independent. here it might not work because of arrays. Have to dig a bit here.
  • debounce over a few ms the internal search function. This will work but will add some complexity and magic.
  • cancel first request if we are initiating a new search. Could have positive side effects on weird latency issues. I think it's feasible, must check.
@bobylito bobylito added this to the V2 milestone Apr 1, 2015
@bobylito
Copy link
Contributor Author

Fixed in ad8befd

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant