diff --git a/packages/builder/src/components/integration/KeyValueBuilder.svelte b/packages/builder/src/components/integration/KeyValueBuilder.svelte index 700e3cd8cb..96024782eb 100644 --- a/packages/builder/src/components/integration/KeyValueBuilder.svelte +++ b/packages/builder/src/components/integration/KeyValueBuilder.svelte @@ -28,6 +28,7 @@ export let valueHeading export let tooltip export let menuItems + export let showMenu = false let fields = Object.entries(object).map(([name, value]) => ({ name, value })) let fieldActivity = buildFieldActivity(activity) @@ -90,8 +91,9 @@
{#each fields as field, idx} deleteEntry(idx)} /> {/if} - {#if menuItems?.length > 0 && !readOnly} + {#if menuItems?.length > 0 && showMenu}
@@ -156,4 +158,7 @@ .readOnly { grid-template-columns: 1fr 1fr; } + .readOnly-menu { + grid-template-columns: 1fr 1fr 20px; + } diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte index af1f629abf..735c98d567 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte @@ -220,6 +220,14 @@ }, }, ] + const responseHeadersMenuItems = [ + { + text: "Create dynamic variable", + onClick: () => { + console.log("create variable") + }, + }, + ] onMount(async () => { query = getSelectedQuery() @@ -398,6 +406,7 @@ headings options={SchemaTypeOptions} menuItems={schemaMenuItems} + showMenu={!schemaReadOnly} readOnly={schemaReadOnly} /> @@ -407,7 +416,12 @@