You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all awesome plugin. Really is a complete pleasure to use. I think there is a bug though. For my use case I am using a button to trigger the search. This works fine for most cases except for one. If the user types values in and then clicks on the search button without clicking anywhere else or without hitting the tab key then a subsequent call to visualSearch.searchQuery.facets() does not pick up the last value you entered.
I have created a gist (https://gist.github.com/theshadow7/10186153) that demonstrates this issue. It is basically the demo on the official page with a couple of lines added to add a search button and a click event handler that prints visualSearch.searchQuery.facets() to the console.
Steps to reproduce:
Use the attached html file
Enter a few values in the search box, make sure you type the last one (eg address: myaddress)
3.Click the search button.
In your console you will see that the last value of address is empty
If you click search again now you will have the right value for address.
For example if I enter
country: United States account: 5-samuel U.S. State:California address: aaa
and click the search button directly the output is
[Object { country="United States"}, Object { account="5-samuel"}, Object { U.S. State="California"}, Object { address=""}]
So after a lot of poking around, I found a workaround; you can override the click even on the button and add the following to trigger visualsearch to detect the facets:
visualSearch.searchBox.disableFacets();
hope this helps any other soul trapped with this legacy!
Hey,
First of all awesome plugin. Really is a complete pleasure to use. I think there is a bug though. For my use case I am using a button to trigger the search. This works fine for most cases except for one. If the user types values in and then clicks on the search button without clicking anywhere else or without hitting the tab key then a subsequent call to visualSearch.searchQuery.facets() does not pick up the last value you entered.
I have created a gist (https://gist.github.com/theshadow7/10186153) that demonstrates this issue. It is basically the demo on the official page with a couple of lines added to add a search button and a click event handler that prints visualSearch.searchQuery.facets() to the console.
Steps to reproduce:
3.Click the search button.
If you click search again now you will have the right value for address.
For example if I enter
country: United States account: 5-samuel U.S. State:California address: aaa
and click the search button directly the output is
[Object { country="United States"}, Object { account="5-samuel"}, Object { U.S. State="California"}, Object { address=""}]
If you change the click hander to this:
Then visualSearch.searchQuery.facets() gives the right output.
The text was updated successfully, but these errors were encountered: