chore(templ): warn against change handlers on the bookshelf library select
The bookshelf select (#library-select) sits inside the htmx filter form and the SSR route honors ?offset= — wiring a change handler or hx-trigger="change" on it would let header.ts's synthetic restore event re-fetch the grid at offset 0, the same stomp class that broke the /series paginator. Comment-only guard; regenerated bookshelf_templ.go carries it into the emitted markup.
This commit is contained in:
1 parent
18f52d240b
commit
1ce66b2213
2 files changed
+25
-19
No files matched your search
@@ -139,6 +139,12 @@ templ BookShelf(
|
||||
<div class="p-6 space-y-5">
|
||||
<div>
|
||||
<label class="block text-xs font-semibold uppercase tracking-wide mb-2" style="color: var(--text-secondary)">Library</label>
|
||||
<!-- Do NOT wire a `change` handler (or hx-trigger="change")
|
||||
on this select: header.ts restoreLibrarySelection may
|
||||
fire a synthetic change on page load, and a handler
|
||||
here would re-fetch the grid at offset 0, stomping
|
||||
SSR pagination (?offset=). User changes go through
|
||||
bookshelf.ts's own wiring only. -->
|
||||
<select id="library-select" name="library_id" class="input">
|
||||
if len(libraries) == 0 {
|
||||
<option value="">No libraries available</option>
|
||||
|
||||
Reference in new issue
Block a user