algolia / algolia/doc-code-samples

updating querystring with query value

Open
#435 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
99
Forks
122
PR merge metrics
No merged PRs in 30d

Description

hi, thanks so much for the example.
i am trying to get this working with the query parameter in the url. is this possible?

i can find in the documentation of the autocomplete lib some information about state

```
initialState: {
// This uses the `search` query parameter as the initial query
query: new URL(window.location).searchParams.get('query'),
},

onStateChange({ state }) {
console.log(state);
},
```

This doesn't seem to work in the selectize version. Any help would be great!

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Start by locating the Selectize example and reading the autocomplete state documentation alongside the shown initialState and onStateChange snippets. Done means the example clearly handles the requested query-parameter behavior or documents the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.