Skip to content

ListInput ​

Edits a list of records with a consistent shape. Each column supplies an input through renderInput, with add, remove, validation, drag, and keyboard-reorder support.

Import ​

ts
import { ListInput } from '@astryx-vue/lab'

Props ​

NameTypeDefaultDescription
modelValueT[][]Records, bound with v-model.
labelstringRequiredList label and accessible name.
columnsListInputColumn<T>[]RequiredColumn definitions and input renderers.
getItemKey(item) => string | numberRequiredReturns a stable record key.
createItem() => TRequiredCreates a record for the add action.
description / itemNamestringundefinedList description and singular item noun.
statusFieldStatusundefinedWhole-list validation status.
getItemStatus(item, index) => FieldStatusundefinedPer-record validation status.
getFieldStatus(item, columnKey, index) => FieldStatusundefinedPer-cell validation status.
isReorderablebooleanfalseAllows reordering.
isDisabled / isLoadingbooleanfalseDisabled or busy state.
maxItemsnumberundefinedMaximum record count.
isLabelHidden / isOptional / isRequiredbooleanfalseLabel and required markers.

A column contains key, header, optional width, and renderInput. The renderer receives the record, accessible label, status, disabled state, and updateItem; the example connects core's TextInput.

Events ​

change emits both the new array and the change details: add, update, remove, or reorder.