-
-
Notifications
You must be signed in to change notification settings - Fork 499
Open
Labels
Description
Continuation from the discussion #709. Listeners are implemented, however the meta field is yet to be started.
The proposal is to have the meta data available to the field component:
(example shamelessly ripped form #709)
<form.Field
name="foo"
meta={({ fieldApi }) => ({
disabled: fieldApi.form.getFieldValue('someOtherField') == null,
...
})}
// or maybe expose values directly like form.Subscribe
meta={({ values }) => ({
disabled: values.someOtherField == null,
...
})}
>
{(field, meta) => <Comp
disabled={meta.disabled}
...
You can subscribe to the meta from the Form but its pretty handy to have it available to the Field component.
I'm happy to give this a go, I just need the go ahead from a maintainer. 🤟