Skip to content
On this page

EzFormList Component API

Props

NameDescriptionType
nameForm list's name path to sync dataNamePath
formListFormList Instance to controls this form list from outside.FormListInstance
labelForm list's labelstring
defaultValueForm list's default valueany[]
valuePropNameInput's value prop name to pass data tostring
changeEventPropNameInput's change event prop name to listen tostring
blurEventPropNameInput's blur event prop name to listen tostring
getValueFromChangeEventFunction to get data from change event(event:any) => any
valueTransformerFunction to transform data received from form's data to pass to input and backwardsFormItemValueTransformer
autoBindingAuto binding value and event to inputboolean
inputNodeIndexIndex of input in node list to binding data to. Default: 0number
requiredMarkShow form list's required markboolean | string
rulesValidation rulesRule
validateTriggerConfig field validate triggerValidateTrigger
validateFirstValidate first rule of form list onlyValidateTrigger
noStyleHide label and errorboolean
colonShow label colonboolean

Events

NameDescriptionType
onChangeTrigger after form list data changed(values: any) => void

Scoped slots

Slot Default

NameDescriptionType
valueValue of form listArray<any>
lengthLength of form list's valuenumber
fieldsList generated fields data to pass to form itemFormListField[]
getNamePathFunction to generate name path of form item in form list(index: number, namePath: string) => Array<string|number>
errorsList error of form listArray
getErrorsFunction to get list array of form list's item(index: number) => Array
hasErrorFunction to check if form item has error if(index: number) => boolean
addFunction to add item to form list(value?: any) => void
insertFunction to insert item to an index of form list(index:number; value?: any) => void
unshiftFunction to add item to first index of form list(value?: any) => void
popFunction to remove last item of form list() => void
shiftFunction to remove first item of form list() => void
removeFunction to remove item from form list by index(index: number) => void
removeByKeyFunction to remove item from list by custom key(key: string, value: any) => void
swapFunction to swap two item by index(firstIndex: number, secondIndex: number) => void
replaceFunction to replace an item of list with other value(index: number, value: any) => void
moveFunction to move an item of list to other index(fromIndex: number, toIndex: number) => void
formForm's utility functions and dataFormInstance

Slot Errors

NameDescriptionType
errorsErrors of form list itself, not include it's fields errors.ValidateError | undefined
formFormInstance
formListFormListInstance

EzForm