-
Notifications
You must be signed in to change notification settings - Fork 329
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
docs(instantsearch): keep autocomplete in sync with query during navigation #1036
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ae3b490:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The query is not synced with this behavior:
- Open https://r7j67q.csb.app/?instant_search%5Bquery%5D=tested
- Refine on a category
- Go back, the query is cleared from the Autocomplete input
Screen.Recording.2022-11-02.at.12.55.11.mov
Good find @FabienMotte, this happens because there is no initial |
Thanks @dhayab! 👏 Is the sandbox working on your side? Not sure why CodeSandbox is giving a syntax error: https://codesandbox.io/s/github/algolia/autocomplete/tree/docs/instantsearch-example-query-sync/examples/instantsearch |
FX-1942
This PR updates autocomplete query to stay in sync with the one in InstantSearch (with routing enabled).
I also changed the templates from strings to html tagged templates, which allowed me to remove
preact
as a dependency.We can push the change to the other flavours after we agree on the code for this one.
Preview →