You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the form is submitted, and a 200 response is returned, then the response contains two tr elements: one that replaces the row with id new-item-name-row and a second row with the new item.
This works fine. But when I replace hx-target by hx-target-2*, then the form element gets replaced by the two rows, which completely screws up the table.
If I change the view code to return a 409 status instead of status 200, then it works perfectly.
Is this a bug in the extension?
The text was updated successfully, but these errors were encountered:
Definitely sounds like a bug indeed. could it be that response-targets doesn't get processed and htmx uses its default hx-target value (i.e. this) which could explain what your form itself gets replaced?
If you'd like to investigate, please feel free to do so! bugfix PRs are much welcome
In a Django project I have this fragment of HTML:
When the form is submitted, and a 200 response is returned, then the response contains two
tr
elements: one that replaces the row with idnew-item-name-row
and a second row with the new item.This works fine. But when I replace
hx-target
byhx-target-2*
, then theform
element gets replaced by the two rows, which completely screws up the table.If I change the view code to return a 409 status instead of status 200, then it works perfectly.
Is this a bug in the extension?
The text was updated successfully, but these errors were encountered: