diff --git a/packages/bbui/src/Form/Core/Picker.svelte b/packages/bbui/src/Form/Core/Picker.svelte index 5f4da1cad9..143536a60a 100644 --- a/packages/bbui/src/Form/Core/Picker.svelte +++ b/packages/bbui/src/Form/Core/Picker.svelte @@ -63,9 +63,9 @@ const getFilteredOptions = (options, term, getLabel) => { if (autocomplete && term) { const lowerCaseTerm = term.toLowerCase() - return options.filter(option => - getLabel(option)?.toLowerCase().includes(lowerCaseTerm) - ) + return options.filter(option => { + return `${getLabel(option)}`.toLowerCase().includes(lowerCaseTerm) + }) } return options } diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 6c4f84936b..d648b3f989 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -96,13 +96,16 @@ allSteps[idx].schema?.outputs?.properties ?? {} ) bindings = bindings.concat( - outputs.map(([name, value]) => ({ - label: name, - type: value.type, - description: value.description, - category: idx === 0 ? "Trigger outputs" : `Step ${idx} outputs`, - path: idx === 0 ? `trigger.${name}` : `steps.${idx}.${name}`, - })) + outputs.map(([name, value]) => { + const runtime = idx === 0 ? `trigger.${name}` : `steps.${idx}.${name}` + return { + label: runtime, + type: value.type, + description: value.description, + category: idx === 0 ? "Trigger outputs" : `Step ${idx} outputs`, + path: runtime, + } + }) ) } return bindings @@ -261,7 +264,6 @@ value={inputData[key]} on:change={e => onChange(e, key)} {bindings} - allowJS={false} /> {/if} diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DataSourceSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DataSourceSelect.svelte index dc1b24077a..220bd41205 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DataSourceSelect.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DataSourceSelect.svelte @@ -17,7 +17,6 @@ queries as queriesStore, } from "stores/backend" import { datasources, integrations } from "stores/backend" - import { notifications } from "@budibase/bbui" import ParameterBuilder from "components/integration/QueryParameterBuilder.svelte" import IntegrationQueryEditor from "components/integration/index.svelte" import { makePropSafe as safe } from "@budibase/string-templates" @@ -31,6 +30,7 @@ const arrayTypes = ["attachment", "array"] let anchorRight, dropdownRight let drawer + let tmpQueryParams $: text = value?.label ?? "Choose an option" $: tables = $tablesStore.list.map(m => ({ @@ -105,12 +105,12 @@ } }) - function handleSelected(selected) { + const handleSelected = selected => { dispatch("change", selected) dropdownRight.hide() } - function fetchQueryDefinition(query) { + const fetchQueryDefinition = query => { const source = $datasources.list.find( ds => ds._id === query.datasourceId ).source @@ -124,6 +124,19 @@ const getQueryDatasource = query => { return $datasources.list.find(ds => ds._id === query?.datasourceId) } + + const openQueryParamsDrawer = () => { + tmpQueryParams = value.queryParams + drawer.show() + } + + const saveQueryParams = () => { + handleSelected({ + ...value, + queryParams: tmpQueryParams, + }) + drawer.hide() + }