smrt
Open the smrt source on GitHub Switch to dark color scheme
← All UI components

Svelte · Overview

WidgetOptionsForm

Edits one widget's options (#3727). A widget's options are plain fields, so this reads like the generated record forms: smrt-ui form controls driven by the option field descriptors (label, help, required, type), with the same save/cancel bar. It validates through the widget's schema (via `onsave`) and shows each problem beside its field.

Public export

typescript
import { WidgetOptionsForm } from '@happyvertical/smrt-svelte/overview';
Import path
@happyvertical/smrt-svelte/overview
Props
6
Props described
0 of 6
Bindable state
0
Callback events
2
Verified release
0.62.10

Props

NameTypeRequiredDescription
definitionRegisteredWidgetYesNot described
initialOverviewOptionsYesNot described
modelsreadonly { value: string; label: string; }[]NoNot described
onsave(options: OverviewOptions) => WidgetOptionIssue[] | nullYesNot described
oncancel() => voidYesNot described
optionsEditorComponent<WidgetOptionsEditorProps>NoNot described

Bindable state

This component has no bindable public state.

Callback events

  • onsave(options: OverviewOptions) => WidgetOptionIssue[] | null
  • oncancel() => void

Examples and explanation