Closed E8y2FqZE closed 1 month ago
Hello and welcome to SQLPage, @E8y2FqZE !
Can you tell us more about what you are building ?
I'm not sure the framework (SQLPage) should prefill the text field when the search
URL parameter is set, but I'm sure it should at least be possible for the application author to easily implement this behavior.
We should add a search_value
parameter to the shell component.
This can be done here: https://github.com/lovasoa/SQLpage/blob/main/sqlpage/templates/shell.handlebars#L98 and should be documented here: https://github.com/lovasoa/SQLpage/blob/main/examples/official-site/sqlpage/migrations/01_documentation.sql#L748-L767
Can you open a pull request ?
Hi, see if that works #359 then I can update the doc
Here's a non-JS version: #362
I'm closing this since we merged #362
Introduction
When the
search_target
is provided in the shell component, the?search=
query parameter value should be used as the text input value when present. Currently the search input is cleared on every page load.Actual behavior
Notice that the search input field is empty when the
?search=
query parameter is present.Screenshots
Expected behavior
The search value should be in the text box rather than being blank. This is standard UI behavior (e.g. search for something on Github, when the results are returned the textbox is not cleared out).