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 */}}
|
{{/* 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>
|
||||||
|
|||||||
+1
-1
@@ -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]"
|
||||||
|
|||||||
+1
-2
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user