When i delete an element i want the page to refresh/reload #2524
-
Hey Everyone, Ive starting using Htmx recently (originally coming from react) im using fastapi, jinja and htmx The issue: <i hx-delete="/library/{{ book.id }}/card/{{ card_data.id }}"
hx-trigger="click" hx-target="#transaction-row-{{ party_data.id }}"
hx-confirm="Are you sure you want to delete this party?"
hx-swap="outerHTML"
hx-skip-attributes="hx-trigger,hx-target"
class="fa-regular fa-trash-can"></i> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Depends on how you handle the cards, if it's in a single container div, it might be just a case of adding/updating some CSS. Another case might be where you have another div around #transaction-row-{{ party_data.id }} that is not deleted, so it still fills that space. |
Beta Was this translation helpful? Give feedback.
@Telroshan - Thank you so much your a life saver!!!!
You were very correct its where the
hx-target
was, it should have been the outter layer not the inner and then fixed it!