Get initial search value from query parameters
Related to gitlab-org/gitlab#353563 (closed)
Sets the contents of ?q=
as the initial value for the search input and triggers the search. The search term can be deleted/edited as usual.
For a future iteration, we could map the keys of the columns as filters, although this would require control over the source of the data, which we don't have at the moment, and will be addressed at gitlab-org/gitlab#351469 (closed).
It also keeps the search state in the URL, to increase the feature discoverability.
How to set up and validate locally
- Run the project locally.
- Visit
http://localhost:9080/?q=optional
. - Results should be filtered by the
optional
value - Any change in the search bar should be reflected by the URL.
Edited by Axel García