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
ArrayFieldpassed torenderFieldasextraprop
Fixed
ArrayFieldnow also supportsFormItemProps- If you want to pass an empty label to a Control due to
element-uilimitations — now you can. It won't be anameprop anymore. - But if you will pass a
labelthat meanslabel={true}you will get a labelstartCase(name)
2.5.6
2.5.5
2.5.4
2.5.4
Updated
renderFieldnow supports not only a function as prop value, also it supports any Component- A Component will get
{ data, fields, name }options, wheredatais an Array,fieldsis an Object with methods to manipulate that Array,nameis a String passed as anametoArrayFieldcomponent
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>
)
}
}