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 */}} {{/* optional props: .Listings = .Accounts.GetSyncGroupListingDrafts */}}
{{/* TODO: make the save button disabled based on an api call */}}
{{- $acctID := .PathParams.acctID }} {{- $acctID := .PathParams.acctID }}
{{- $orderIndex := .PathParams.orderIndex }} {{- $orderIndex := .PathParams.orderIndex }}
@@ -135,7 +134,7 @@
{{ component "button" {{ component "button"
"HXDelete" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings/%d" $acctID $orderIndex) "HXDelete" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings/%d" $acctID $orderIndex)
"HXTarget" "#accounts-acct-id-inventory-sync-groups-draft-table" "HXTarget" "#accounts-acct-id-inventory-sync-groups-draft-table"
"HXSwap" "outerHTML" "HXSwap" "none"
"Text" "Remove" "Text" "Remove"
}} }}
</td> </td>
@@ -4,7 +4,7 @@
{{- component "button" {{- component "button"
"HXPost" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings" $acctID) "HXPost" (printf "/api/accounts/%d/inventory/sync-groups/draft/listings" $acctID)
"HXTarget" "#accounts-acct-id-inventory-sync-groups-draft-table" "HXTarget" "#accounts-acct-id-inventory-sync-groups-draft-table"
"HXSwap" "outerHTML" "HXSwap" "none"
"HXSelect" "#accounts-acct-id-inventory-sync-groups-draft-table" "HXSelect" "#accounts-acct-id-inventory-sync-groups-draft-table"
"ID" "sync-groups-draft-table-add-listing-button" "ID" "sync-groups-draft-table-add-listing-button"
"Class" "mt-[1em] mb-[1em]" "Class" "mt-[1em] mb-[1em]"
@@ -10,7 +10,7 @@
hx-get="{{ printf "/ui/accounts/%d/inventory/sync-groups/draft/table" $acctID }}" 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-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-select="#accounts-acct-id-inventory-sync-groups-draft-table"
hx-swap="outerHTML" hx-swap="morph:outerHTML"
> >
<thead> <thead>
<tr> <tr>
@@ -32,7 +32,6 @@
</tr> </tr>
</thead> </thead>
<tbody <tbody
hx-swap="morph"
_=" _="
init init
set element allRowsFilledOut to false set element allRowsFilledOut to false