use/useWidget
Overview
Provides the shared props, emits, and reactive context for form widget components, bridging field context with widget-level value handling and validation state.
Properties
WIDGET_EMITS
Array of Vue event names emitted by widget components. Pass to the emits option of a widget component.
@vueda-spread emits
Type: string[]
Source: client/lib/use/useWidget.js:106
WIDGET_PROPS
Vue component props definition for widget components. Spread into component options to include standard widget identification, display, validation, value handling, disabled behavior, and field context props.
@vueda-spread props
Type: object
Source: client/lib/use/useWidget.js:15
Methods
- useWidget - Generate and provide a widget context for a widget, using the provided props and emit function, including methods to update the widget's value, touch state, force modified recalculation, and focus or blur it.
Types
WidgetContext
WidgetContextRawProps
WidgetContextRawState
ValueAdapter
ValueAdapter = (args: any[]) => any
WidgetContextProps
WidgetContextProps = UnwrapNestedRefs
WidgetContextState
WidgetContextState = UnwrapNestedRefs
Source
client/lib/use/useWidget.js:1