diff --git a/packages/standard-components/src/forms/Form.svelte b/packages/standard-components/src/forms/Form.svelte index 5e810d5086..1052abcbe5 100644 --- a/packages/standard-components/src/forms/Form.svelte +++ b/packages/standard-components/src/forms/Form.svelte @@ -98,13 +98,11 @@ const newValue = value == null ? defaultValue : value const newError = validate ? validate(newValue) : null - const newValid = !newError // Update field state fieldState.update(state => { state.value = newValue state.error = newError - state.valid = newValid return state }) @@ -120,7 +118,7 @@ return state }) - return newValid + return !newError } return { setValue, @@ -138,7 +136,6 @@ fieldId: `id-${generateID()}`, value: initialValues[field] ?? defaultValue, error: null, - valid: true, disabled: fieldDisabled, }) } diff --git a/packages/standard-components/src/forms/OptionsField.svelte b/packages/standard-components/src/forms/OptionsField.svelte index 82f213686b..6117f6f35a 100644 --- a/packages/standard-components/src/forms/OptionsField.svelte +++ b/packages/standard-components/src/forms/OptionsField.svelte @@ -1,6 +1,6 @@ {#if fieldState} - option === $fieldState.value} - onSelectOption={selectOption} /> + - + fieldApi.setValue(e.detail)} + disabled={$fieldState.disabled} + error={$fieldState.error} + id={$fieldState.fieldId} + {placeholder} + {type} /> {/if} - - diff --git a/packages/standard-components/src/index.js b/packages/standard-components/src/index.js index edc54a1114..c7c536f2ca 100644 --- a/packages/standard-components/src/index.js +++ b/packages/standard-components/src/index.js @@ -1,4 +1,3 @@ -import "@budibase/bbui/dist/style.css" import "@spectrum-css/vars/dist/spectrum-global.css" import "@spectrum-css/vars/dist/spectrum-medium.css" import "@spectrum-css/vars/dist/spectrum-large.css"