Skip to content

WidgetModel

Overview

Renders a select, multi-select, or radio widget populated with choices fetched from a Django model. Choices are loaded lazily: the API request is deferred until the field is focused or already has a value. Pass the type prop to choose between select, multiSelect, and radio presentations.

Props

NameTypeRequiredDefaultDescription
fieldAppstringyesDjango app label for the model whose choices this widget loads.
fieldModelstringyesDjango model name used to resolve the choices endpoint.
fieldNamestringyesField name on the model whose choices are fetched.
typestringyesWidget presentation variant: "select", "multiSelect", or "radio".
modelValuestring|number|arrayundefinedThe currently selected value, bound with v-model.
isFilterbooleanfalseWhen true, fetches choices in filter mode (may relax required-field constraints).

Slots

slot

Scoped slot.

Bindings

NameDescription
name

Events

NameDescription
update:modelValueEmitted when the widget value changes.

Full event reference

Source

client/lib/widgets/WidgetModel.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2