diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js index aaf25f6d03..1a64a8958f 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js +++ b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js @@ -161,7 +161,11 @@ export function makeDatasourceFormComponents(datasource) { placeholder: field, }) if (fieldType === "options") { - component.customProps({ placeholder: "Choose an option " }) + component.customProps({ + placeholder: "Choose an option", + optionsType: "select", + optionsSource: "schema", + }) } if (fieldType === "link") { let placeholder = diff --git a/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte b/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte index c8e23cc535..9ec1108985 100644 --- a/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte @@ -71,7 +71,7 @@ /> {/if} {#if settings && settings.length > 0} - {#each settings as setting} + {#each settings as setting (setting.key)} {#if canRenderControl(setting)} updateProp(setting.key, val)} props={{ - options: setting.options, - placeholder: setting.placeholder, + options: setting.options || [], + placeholder: setting.placeholder || null, }} {bindings} {componentDefinition} diff --git a/packages/standard-components/src/forms/OptionsField.svelte b/packages/standard-components/src/forms/OptionsField.svelte index 29ec7c2328..8a455e50ed 100644 --- a/packages/standard-components/src/forms/OptionsField.svelte +++ b/packages/standard-components/src/forms/OptionsField.svelte @@ -1,5 +1,5 @@