Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
HX-Reselect
currently does not supportunset
like the attributehx-select
does. I think an htmx user would expect that, and for me it is quite handy to have that feature.I hope it is okay for me to open a PR to illustrate the linked issue, since it's somewhere in-between a feature and a bugfix I would say.
Corresponding issue: #3152
Testing
Basically already using this in one of my projects to have server-side rendering of redirects.
If the server would trigger a redirect, I just render the response of the redirected view and use
HX-Reselect
,HX-Retarget
,HX-Reswap
for swapping. Saves me one round trip and let's me use redirects more freely. And for full body swaps I need to useunset
.Checklist
master
for website changes,dev
forsource changes)
approved via an issue
npm run test
) and verified that it succeeded