stop draft sync group table from scrolling when updated

This commit is contained in:
2026-01-23 02:46:09 -07:00
parent 3d70d08dac
commit a44a727c92
3 changed files with 3 additions and 5 deletions
@@ -1,5 +1,4 @@
{{/* optional props: .Listings = .Accounts.GetSyncGroupListingDrafts */}}
{{/* TODO: make the save button disabled based on an api call */}}
{{- $acctID := .PathParams.acctID }}
{{- $orderIndex := .PathParams.orderIndex }}
@@ -135,7 +134,7 @@
{{ component "button"
"HXDelete" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings/%d" $acctID $orderIndex)
"HXTarget" "#accounts-acct-id-inventory-sync-groups-draft-table"
"HXSwap" "outerHTML"
"HXSwap" "none"
"Text" "Remove"
}}
</td>
@@ -4,7 +4,7 @@
{{- component "button"
"HXPost" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings" $acctID)
"HXTarget" "#accounts-acct-id-inventory-sync-groups-draft-table"
"HXSwap" "outerHTML"
"HXSwap" "none"
"HXSelect" "#accounts-acct-id-inventory-sync-groups-draft-table"
"ID" "sync-groups-draft-table-add-listing-button"
"Class" "mt-[1em] mb-[1em]"
@@ -10,7 +10,7 @@
hx-get="{{ printf "/ui/accounts/%d/inventory/sync-groups/draft/table" $acctID }}"
hx-trigger="sse:{{ printf "accounts_%d_inventory_sync-groups_draft" $acctID }},sse:{{ printf "accounts_%d_inventory_sync-groups_draft_listings" $acctID }}"
hx-select="#accounts-acct-id-inventory-sync-groups-draft-table"
hx-swap="outerHTML"
hx-swap="morph:outerHTML"
>
<thead>
<tr>
@@ -32,7 +32,6 @@
</tr>
</thead>
<tbody
hx-swap="morph"
_="
init
set element allRowsFilledOut to false