final-form / final-form/react-final-form
allowNull={false} not working?
Open
- 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
Assessment
This issue has not been assessed yet.