Fix row action count for views

This commit is contained in:
Andrew Kingston 2024-09-03 11:50:20 +01:00
parent 2a02298ac2
commit 7d5e884a8f
No known key found for this signature in database
2 changed files with 2 additions and 3 deletions

View File

@ -23,8 +23,7 @@
$: tableId = ds?.tableId $: tableId = ds?.tableId
$: isView = ds?.type === "viewV2" $: isView = ds?.type === "viewV2"
$: fetchRowActions(tableId) $: fetchRowActions(tableId)
$: viewActiveCount = 0 $: actionCount = rowActions.filter(action => !isView || action.enabled).length
$: actionCount = isView ? viewActiveCount : rowActions.length
const rowActionUrl = derived([url, appStore], ([$url, $appStore]) => { const rowActionUrl = derived([url, appStore], ([$url, $appStore]) => {
return ({ automationId }) => { return ({ automationId }) => {

View File

@ -146,10 +146,10 @@
{#if !isUsersTable} {#if !isUsersTable}
<GridRowActionsButton /> <GridRowActionsButton />
{/if} {/if}
<GridScreensButton on:request-generate={() => generateButton?.show()} />
<GridAutomationsButton <GridAutomationsButton
on:request-generate={() => generateButton?.show()} on:request-generate={() => generateButton?.show()}
/> />
<GridScreensButton on:request-generate={() => generateButton?.show()} />
{#if !isUsersTable} {#if !isUsersTable}
<GridImportButton /> <GridImportButton />
{/if} {/if}