final-form / final-form/react-final-form

[improvements] List of the form disabled fields

Open
#501 2 comments 3 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.