Skip to content

Commit d267819

Browse files
authored
Merge pull request #8167 from marmelab/fix-parse-doc
fix parse doc
2 parents fe1e4c3 + 3d3808c commit d267819

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Inputs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ import { TextInput } from 'react-admin';
339339
const TextInputWithNullEmptyValue = props => (
340340
<TextInput
341341
{...props}
342-
parse={ v => typeof v === 'string' && v.length === 0 ? null : v }
342+
parse={ v => v === '' ? null : v }
343343
/>
344344
);
345345

0 commit comments

Comments
 (0)