elastic / search-ui

Search UI. Libraries for the fast development of modern, engaging search experiences.
https://docs.elastic.co/search-ui
Apache License 2.0
1.92k stars 368 forks source link

support for additional non search ui query pramerters and/or hash url with TrackUrlState #1006

Closed dankoz51 closed 9 months ago

dankoz51 commented 10 months ago

Using TrackUrlState does not allow for existing url parameters or the url has to persist. It completely replaces them.

It would be nice if additional URL parameters were written back the URL so that we can use them for additional program logic. Additionally the hash part should persist as well for the same reason.

Saving additional urls to local data works but does not allow the url to have this info. Other than that we would have to hack into the library.

image

joemcelroy commented 9 months ago

Sorry for delay in replying. Have you seen the RoutingOptions configuration? Here you will be able to override the default serialise / parsing of the url. This will allow you to preserve some params which you manage outside of Search UI. https://docs.elastic.co/search-ui/api/core/configuration#routing-options