Files
spring-boot-demo/thymeleaf-htmx/output/09-delete-last-page-clamps.txt
T

80 lines
2.8 KiB
Plaintext

# deleted the 3 rows on page 5, then the table (which re-fetches page 5 after HX-Trigger) asks for page index 4
# request (curl notation, sent through MockMvc): curl -H 'HX-Request: true' '/contacts?page=4'
HTTP 200
---- body (2602 chars) ----
<div id="contact-table" hx-trigger="contactsChanged from:body" hx-target="this" hx-swap="outerHTML" hx-get="/contacts?page=3">
<table>
<thead><tr><th>Name</th><th>Email</th><th>Role</th><th></th></tr></thead>
<tbody>
<tr id="contact-16">
<td>Pooja Verma</td>
<td>[email protected]</td>
<td>Manager</td>
<td>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-get="/contacts/16/edit">Edit</button>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-delete="/contacts/16" hx-confirm="Delete Pooja Verma?">Delete</button>
</td>
</tr>
<tr id="contact-17">
<td>Qasim Ansari</td>
<td>[email protected]</td>
<td>Developer</td>
<td>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-get="/contacts/17/edit">Edit</button>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-delete="/contacts/17" hx-confirm="Delete Qasim Ansari?">Delete</button>
</td>
</tr>
<tr id="contact-18">
<td>Rohan Sawant</td>
<td>[email protected]</td>
<td>Tester</td>
<td>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-get="/contacts/18/edit">Edit</button>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-delete="/contacts/18" hx-confirm="Delete Rohan Sawant?">Delete</button>
</td>
</tr>
<tr id="contact-19">
<td>Sneha Kamat</td>
<td>[email protected]</td>
<td>Architect</td>
<td>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-get="/contacts/19/edit">Edit</button>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-delete="/contacts/19" hx-confirm="Delete Sneha Kamat?">Delete</button>
</td>
</tr>
<tr id="contact-20">
<td>Tanmay Ghosh</td>
<td>[email protected]</td>
<td>Manager</td>
<td>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-get="/contacts/20/edit">Edit</button>
<button type="button"
hx-target="closest tr" hx-swap="outerHTML" hx-delete="/contacts/20" hx-confirm="Delete Tanmay Ghosh?">Delete</button>
</td>
</tr>
</tbody>
</table>
<nav class="pager" aria-label="Pages">
<a href="/contacts?page=2" hx-target="#contact-table" hx-push-url="true" hx-get="/contacts?page=2">&laquo; Prev</a>
<span>Page 4 of 4 (20 contacts)</span>
</nav>
</div>