stop draft sync group table from scrolling when updated
This commit is contained in:
+1
-2
@@ -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>
|
||||
|
||||
+1
-1
@@ -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]"
|
||||
|
||||
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user