Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataSearch component - controlled behaviour not working #2114

Open
cohenj-else opened this issue Oct 27, 2022 · 4 comments
Open

DataSearch component - controlled behaviour not working #2114

cohenj-else opened this issue Oct 27, 2022 · 4 comments
Labels

Comments

@cohenj-else
Copy link

cohenj-else commented Oct 27, 2022

Affected Projects
React

Library Version: x.y.z
3.41.1 (working correctly in 3.0.0)

Describe the bug
When using the controlled behaviour of the DataSearch component to only trigger 'on enter' (as described here #994 (comment))
, query is triggered on every keypress.

To Reproduce
Edit reactivesearch-quickstart-final-app (forked)

Steps to reproduce the behavior:
Using above codesandbox:

Type in search box, query is made on every keypress.

Expected behavior
Type in search box, query is made only after key 'enter'.
(switching library version to 3.0.0 and behaviour is as expected).

Thanks for your help and for a great library!

@cohenj-else
Copy link
Author

This is working correctly for the SearchBox component, so that is a fine alternative. Probably this can be closed if you prefer. Thanks!

@rs-unsilo
Copy link

We have this issue as well. We want to use "DataSearch". Can it be fixed instead?

@siddharthlatest
Copy link
Member

@rs-unsilo Any reason to use DataSearch over SearchBox?

@rs-unsilo
Copy link

rs-unsilo commented Nov 29, 2022

We use a customQuery directly to an elastic endpoint. Is that possible with SearchBox? IE. connect directly to an elastic endpoint (via a local proxy). From documentation it sounds a lot more bothersome with having to use a third party service, etc. compared to DataSearch

Regarding DataSearch - It must be a quite obvious bug to fix? triggeQuery() is called on every keystroke no matter how you set it up

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

No branches or pull requests

3 participants