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

allowNull={false} not working?

Open
#342 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

When a user backspaces until an input is blank, the value of the input inside of the `values` object becomes `null`. Unless I'm misunderstanding, this should never be possible due to the `allowNull` prop?

Demo: https://codesandbox.io/s/z6w7qkky83

For scanning
```
const initialValues = { lastName: '' };
const App = () => (
{
if (values.lastName == null) {
console.warn('-------lastName is null----------');
}
return (


First Name



);
}}
/>
);
```

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.