mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-30 00:16:53 +00:00
fix(frontend): Correctly handle undefined actions
This commit is contained in:
@@ -184,7 +184,10 @@
|
||||
if (c.type === 'tablecomponent') {
|
||||
r.push(...c.actionButtons.map((x) => ({ input: x.componentInput, id: x.id })))
|
||||
}
|
||||
if (c.type === 'aggridcomponent' || c.type === 'aggridcomponentee') {
|
||||
if (
|
||||
(c.type === 'aggridcomponent' || c.type === 'aggridcomponentee') &&
|
||||
Array.isArray(c.actions)
|
||||
) {
|
||||
r.push(...c.actions.map((x) => ({ input: x.componentInput, id: x.id })))
|
||||
}
|
||||
if (c.type === 'menucomponent') {
|
||||
|
||||
@@ -170,7 +170,10 @@ export function allsubIds(app: App, parentId: string): string[] {
|
||||
if (item.data.type === 'tablecomponent') {
|
||||
subIds.push(...item.data.actionButtons?.map((x) => x.id))
|
||||
}
|
||||
if (item.data.type === 'aggridcomponent' || item.data.type === 'aggridcomponentee') {
|
||||
if (
|
||||
item.data.type === 'aggridcomponent' ||
|
||||
(item.data.type === 'aggridcomponentee' && Array.isArray(item.data.actions))
|
||||
) {
|
||||
subIds.push(...item.data.actions?.map((x) => x.id))
|
||||
}
|
||||
if (item.data.type === 'menucomponent') {
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
{/if}
|
||||
|
||||
{#if gridItem?.data?.type === 'aggridcomponent' || (gridItem?.data?.type === 'aggridcomponentee' && Array.isArray(gridItem.data.actions))}
|
||||
{#each gridItem.data.actions as actionButton, index (index)}
|
||||
{#each gridItem.data.actions ?? [] as actionButton, index (index)}
|
||||
{#if actionButton?.id === $selectedComponentInEditor || actionButton?.id + '_transformer' === $selectedComponentInEditor}
|
||||
<InlineScriptEditorPanel
|
||||
on:createScriptFromInlineScript
|
||||
|
||||
Reference in New Issue
Block a user