Releases: detools/vue-form
Releases · detools/vue-form
2.6.1
2.6.0
2.5.11
2.5.10
2.5.9
2.5.8
2.5.7
2.5.7
Added
- Every unrecognized props applied to
ArrayField
passed torenderField
asextra
prop
Fixed
ArrayField
now also supportsFormItem
Props- If you want to pass an empty label to a Control due to
element-ui
limitations — now you can. It won't be aname
prop anymore. - But if you will pass a
label
that meanslabel={true}
you will get a labelstartCase(name)
2.5.6
2.5.5
2.5.4
2.5.4
Updated
renderField
now supports not only a function as prop value, also it supports any Component- A Component will get
{ data, fields, name }
options, wheredata
is an Array,fields
is an Object with methods to manipulate that Array,name
is a String passed as aname
toArrayField
component
import Form, { ArrayField } from '@detools/vue-form'
import Tasklist from '@/components/Tasklist'
// OK
const renderAsFunction = {
render() {
methods: {
renderTasklist({ data, fields, name }) {
return <Tasklist data={data} fields={fields} name={name} />
},
},
return (
<Form>
<ArrayField name="tasklist" renderField={this.renderTasklist} />
</Form>
)
}
}
// NOW OK
const renderAsComponent = {
render() {
return (
<Form>
<ArrayField name="tasklist" renderField={Tasklist} />
</Form>
)
}
}