Skip to content

useComboboxSearch

Overview

Manages reactive state and API data-fetching for a combobox widget backed by a vueda model endpoint. Only call this composable when app and model props are present.

Signature

useComboboxSearch(props, widgetContext)

Parameters

NameTypeRequiredDescription
propsobjectyesComponent props containing app, model, and search configuration.
widgetContextWidgetContextyesThe widget context.

props Properties

NameTypeRequiredDefaultDescription
appstringDjango app label for the model to search.
extraParamsobjectExtra query parameters merged into every API request.
getExtraParamsFunctionFunction returning additional parameters from dependency values.
groupBystringField name to group options by. Requires grouped: true.
groupedbooleanWhether to group options by a field.
modelstringDjango model name.
modelExpandFieldsstring[]Fields to expand in the fetch.
modelFieldsstring[]Additional fields to fetch alongside the label and PK.
modelOrderingstring[]Default ordering for the list.
optionLabelstringField name to display as the option label in the search list.
placeholderstringPlaceholder text.
selectedOptionLabelstringField name for the closed-state display label.

Returns

Reactive search state.

Source

client/lib/use/useComboboxSearch.js:94

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