deprecate row connection in favor of connected + selectedRow

This commit is contained in:
Ruben Fiszel
2023-02-05 20:57:47 +01:00
parent 083a304645
commit ac991dddbc
3 changed files with 9 additions and 2 deletions
@@ -18,6 +18,7 @@
export let horizontalAlignment: 'left' | 'center' | 'right' | undefined = undefined
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
export let noWFull = false
export let preclickAction: (() => Promise<void>) | undefined = undefined
export const staticOutputs: string[] = ['loading', 'result']
@@ -90,6 +91,9 @@
window.dispatchEvent(new Event('pointerup'))
}}
on:click={async (e) => {
if (preclickAction) {
await preclickAction()
}
e?.stopPropagation()
e?.preventDefault()
ownClick = true
@@ -218,6 +218,9 @@
<AppButton
noWFull
{...actionButton}
preclickAction={async () => {
toggleRow(row, rowIndex)
}}
extraQueryParams={{ row: row.original }}
bind:componentInput={actionButton.componentInput}
bind:staticOutputs={$staticOutputsStore[actionButton.id]}
@@ -67,7 +67,7 @@
/>
<svelte:fragment slot="text">Static</svelte:fragment>
</Popover>
{#if rowColumns}
<!-- {#if rowColumns}
<Popover placement="bottom" notClickable disapperTimoout={0}>
<ToggleButton
position="center"
@@ -81,7 +81,7 @@
</ToggleButton>
<svelte:fragment slot="text">Column</svelte:fragment>
</Popover>
{/if}
{/if} -->
{#if userInputEnabled && !input.format?.startsWith('resource-')}
<Popover placement="bottom" notClickable disapperTimoout={0}>
<ToggleButton