Skip to content
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

use hx-include for query params #29

Open
slimnate opened this issue Dec 5, 2023 · 0 comments
Open

use hx-include for query params #29

slimnate opened this issue Dec 5, 2023 · 0 comments

Comments

@slimnate
Copy link
Owner

slimnate commented Dec 5, 2023

While implementing the full tect searching with active search, I discovered the hx-include directive, which would be perfect for sending all of the query params for pagination/sorting/filtering/search with each new request.

The current method is to build a new url for each filter option, sort button, etc. on the server and include that via the render template. Using hx-include will be more performant and less error prone than building query strings on the server.

I can also use hx-values to supply values from the server for things like the sort buttons, since they need to have different values depending on the current sorting order (eg. if currently sorting a column by ascending order, the button should swap the order)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant