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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| fieldApp | string | yes | Django app label for the model whose choices this widget loads. | |
| fieldModel | string | yes | Django model name used to resolve the choices endpoint. | |
| fieldName | string | yes | Field name on the model whose choices are fetched. | |
| type | string | yes | Widget presentation variant: "select", "multiSelect", or "radio". | |
| modelValue | string|number|array | undefined | The currently selected value, bound with v-model. | |
| isFilter | boolean | false | When true, fetches choices in filter mode (may relax required-field constraints). |
Slots
slot
Scoped slot.
Bindings
| Name | Description |
|---|---|
| name |
Events
| Name | Description |
|---|---|
update:modelValue | Emitted when the widget value changes. |
Source
client/lib/widgets/WidgetModel.vue