final-form / final-form/react-final-form
[improvements] List of the form disabled fields
Open
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### What is the current behavior?
At submission, we don't have the list of disabled fields. We need to store it elsewhere.
### What is the expected behavior?
We could imagine adding the props `disabled` to the `Field` component. We could keep a list of disabled fields which could be accessible at form submmission.
ex: We could easily prevent sending the disabled fields to the API.
```
const onSubmit = async (values, form) => {
const disabledFields = form.disabledFields;
// Extract the disabledFields from values below with .filter
};
```
Contributor guide
Assessment
This issue has not been assessed yet.