diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte
index c2d7114499..0791c619a0 100644
--- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte
+++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte
@@ -31,3 +31,16 @@
{/if}
{/each}
{/if}
+
+{#if gridItem?.data?.type === 'menucomponent'}
+ {#each gridItem.data.menuItems as actionButton, index (index)}
+ {#if actionButton?.id === $selectedComponentInEditor || actionButton?.id + '_transformer' === $selectedComponentInEditor}
+
+ {/if}
+ {/each}
+{/if}
diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts
index 54cf0b8554..cb52429441 100644
--- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts
+++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts
@@ -65,6 +65,21 @@ function processGridItemRunnable(gridItem: GridItem, list: AppScriptsList): AppS
)
})
}
+
+ if (component.type === 'menucomponent') {
+ component.menuItems?.forEach((menuItem) => {
+ if (menuItem.componentInput?.type !== 'runnable') {
+ return
+ }
+ processRunnable(
+ menuItem.componentInput.runnable,
+ menuItem.componentInput.transformer,
+ menuItem.id,
+ list
+ )
+ })
+ }
+
if (componentInput?.type === 'runnable') {
processRunnable(componentInput.runnable, componentInput.transformer, gridItem.id, list)
}
diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/ComponentPanel.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/ComponentPanel.svelte
index abe9855297..c7a5c11c94 100644
--- a/frontend/src/lib/components/apps/editor/settingsPanel/ComponentPanel.svelte
+++ b/frontend/src/lib/components/apps/editor/settingsPanel/ComponentPanel.svelte
@@ -36,6 +36,7 @@
import ComponentControl from './ComponentControl.svelte'
import GridAgGridLicenseKey from './GridAgGridLicenseKey.svelte'
import ComponentPanelDataSource from './ComponentPanelDataSource.svelte'
+ import MenuItems from './MenuItems.svelte'
export let componentSettings: { item: GridItem; parent: string | undefined } | undefined =
undefined
@@ -342,6 +343,8 @@
/>
{:else if componentSettings.item.data.type === 'tablecomponent' && Array.isArray(componentSettings.item.data.actionButtons)}
+ {:else if componentSettings.item.data.type === 'menucomponent' && Array.isArray(componentSettings.item.data.menuItems)}
+
{/if}
{#if Object.values(initialConfiguration).length > 0}
diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/MenuItems.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/MenuItems.svelte
new file mode 100644
index 0000000000..584cc5d2aa
--- /dev/null
+++ b/frontend/src/lib/components/apps/editor/settingsPanel/MenuItems.svelte
@@ -0,0 +1,91 @@
+
+
+
+ {#if components.length == 0}
+ No action buttons
+ {/if}
+ {#each components as component}
+
+ {
+ $selectedComponent = [component.id]
+ }}
+ on:keypress
+ >
+
+ {component.id}
+
+
+
+ {#if component.type == 'buttoncomponent'}
+ Button
+ {/if}
+
+
+
+
+ {/each}
+
+
+
+
diff --git a/frontend/src/lib/components/apps/utils.ts b/frontend/src/lib/components/apps/utils.ts
index b7eee7c3f7..71933f9817 100644
--- a/frontend/src/lib/components/apps/utils.ts
+++ b/frontend/src/lib/components/apps/utils.ts
@@ -276,6 +276,16 @@ export function getAllScriptNames(app: App): string[] {
})
}
+ if (gridItem.data.type === 'menucomponent') {
+ gridItem.data.menuItems.forEach((menuItem) => {
+ if (menuItem.componentInput?.type === 'runnable') {
+ if (menuItem.componentInput.runnable?.type === 'runnableByName') {
+ acc.push(menuItem.componentInput.runnable.name)
+ }
+ }
+ })
+ }
+
return acc
}, [] as string[])