form
form copied to clipboard
feat(core): field meta API
Field.meta
From issue #1111 and discussion #709, this pr Introduces the Field.meta api to allow for extensible and easily accessible meta data to the field component.
example api
<form.Field
name="foo"
meta={({ values }) => ({
disabled: values.someOtherField == null,
...
})}
>
{(field, meta) =>
<Comp
disabled={meta.disabled}
... >
</Comp>
Tasks
- [x] Meta available to Field.children
- [ ] MetaFn available to form.Field
- [ ] Tests
- [ ] LGTM 🚀