Django htmx not targeting assigned element
I have a django-tables2 template that I’ve modified to assign a unique row id to each row. I’m trying to add a button that will allow a user to delete a given row on a click. I’m using htmx to initiate the deletion request. I also have an htmx enabled edit button that is working as intended regarding sever side modifications and updating the DOM. The delete button behaviour is as expected on the server side, but the swap appears to impact only the button, and not the tag. After clicking the delete button, the record is removed from the database, but only the button disappears on the DOM, not the <tr>
. I won’t include the views.py as it’s fairly straightforward in that it retrieves the appropriate record, executes the delete, and returns an empty HTTPResponse.