feat: boost pagination and sorting links with htmx

This commit is contained in:
fromme committed 2026-10-16 10:39:47 +02:00
1 parent 493a43d952
commit 13e5b6c3af
8 files changed
+37 -11

No files matched your search

+9
View File
@@ -3,6 +3,15 @@ htmx.config.includeIndicatorStyles = false
htmx.config.historyCacheSize = 0
htmx.config.allowScriptTags = false
// A boosted link is a page navigation: show the error page like the browser would, instead of
// swallowing the 4xx/5xx and leaving the click without effect.
document.addEventListener('htmx:beforeSwap', (event) => {
if (true === event.detail.boosted && event.detail.xhr.status >= 400) {
event.detail.shouldSwap = true
event.detail.isError = false
}
})
import './bootstrap.js';
/*
* Welcome to your app's main JavaScript file!