mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-22 08:02:19 +00:00
fix: improve modal button on aggrid table actions
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
import InputValue from '../../helpers/InputValue.svelte'
|
||||
import { stateSnapshot, withProps } from '$lib/svelte5Utils.svelte'
|
||||
import { get } from 'svelte/store'
|
||||
import SubGridEditor from '$lib/components/apps/editor/SubGridEditor.svelte'
|
||||
|
||||
interface Props {
|
||||
// import 'ag-grid-community/dist/styles/ag-theme-alpine-dark.css'
|
||||
@@ -598,6 +599,13 @@
|
||||
/>
|
||||
{/each}
|
||||
|
||||
{#if render == false || loading || initializing}
|
||||
<div class="overflow-hidden h-0">
|
||||
{#each actions?.filter((x) => x.type == 'modalcomponent') ?? [] as action}
|
||||
<SubGridEditor id={action.id} subGridId={`${action.id}-0`} />
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
<RunnableWrapper
|
||||
{outputs}
|
||||
{render}
|
||||
|
||||
+10
-10
@@ -22,7 +22,7 @@
|
||||
import AppModal from '../../layout/AppModal.svelte'
|
||||
|
||||
interface Props {
|
||||
p: ICellRendererParams<any>
|
||||
p?: ICellRendererParams<any>
|
||||
id: string
|
||||
render: boolean
|
||||
actions?: TableAction[]
|
||||
@@ -89,7 +89,7 @@
|
||||
}
|
||||
})}
|
||||
onpointerdown={stopPropagation((e) => {
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
|
||||
if (!$connectingInput.opened) {
|
||||
$selectedComponent = [action.id]
|
||||
@@ -195,7 +195,7 @@
|
||||
noWFull
|
||||
preclickAction={async () => {
|
||||
dispatch('toggleRow')
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
}}
|
||||
id={action.id}
|
||||
customCss={action.customCss}
|
||||
@@ -219,7 +219,7 @@
|
||||
verticalAlignment="center"
|
||||
preclickAction={async () => {
|
||||
dispatch('toggleRow')
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
}}
|
||||
/>
|
||||
{:else if action.type == 'checkboxcomponent'}
|
||||
@@ -234,7 +234,7 @@
|
||||
onToggle={action.onToggle}
|
||||
preclickAction={async () => {
|
||||
dispatch('toggleRow')
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
}}
|
||||
verticalAlignment="center"
|
||||
{controls}
|
||||
@@ -254,7 +254,7 @@
|
||||
onSelect={action.onSelect}
|
||||
preclickAction={async () => {
|
||||
dispatch('toggleRow')
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
}}
|
||||
{controls}
|
||||
/>
|
||||
@@ -267,7 +267,7 @@
|
||||
{render}
|
||||
preclickAction={async () => {
|
||||
dispatch('toggleRow')
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
}}
|
||||
noWFull
|
||||
id={action.id}
|
||||
@@ -290,7 +290,7 @@
|
||||
verticalAlignment="center"
|
||||
preclickAction={async () => {
|
||||
dispatch('toggleRow')
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
}}
|
||||
/>
|
||||
{:else if action.type == 'checkboxcomponent'}
|
||||
@@ -305,7 +305,7 @@
|
||||
onToggle={action.onToggle}
|
||||
preclickAction={async () => {
|
||||
dispatch('toggleRow')
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
}}
|
||||
/>
|
||||
{:else if action.type == 'selectcomponent'}
|
||||
@@ -323,7 +323,7 @@
|
||||
onSelect={action.onSelect}
|
||||
preclickAction={async () => {
|
||||
dispatch('toggleRow')
|
||||
selectRow(p)
|
||||
p && selectRow(p)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@ export function allItems(
|
||||
export function findGridItem(app: App, id: string): GridItem | undefined {
|
||||
return findGridItemById(app.grid, app.subgrids, id)
|
||||
}
|
||||
|
||||
export function collectOneOfFields(fields: AppInputs, app: App): Record<string, any[]> {
|
||||
return Object.fromEntries(
|
||||
Object.entries(fields ?? {})
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
async function loadAvailableNativeTriggers() {
|
||||
try {
|
||||
const services = await getAvailableNativeTriggerServices($workspaceStore!)
|
||||
console.log({ services })
|
||||
const serviceData = await Promise.all(
|
||||
services.map(async (service) => ({
|
||||
service,
|
||||
|
||||
Reference in New Issue
Block a user