mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Update comment
This commit is contained in:
parent
caa4720005
commit
101b1072c2
@ -146,7 +146,7 @@ const GenericInput = ({
|
|||||||
hint={hint}
|
hint={hint}
|
||||||
required={required}
|
required={required}
|
||||||
onChange={(json) => {
|
onChange={(json) => {
|
||||||
// Default to null when the field is required and there is no input value
|
// Default to null when the field is not required and there is no input value
|
||||||
const value = !attribute.required && !json.length ? 'null' : json;
|
const value = !attribute.required && !json.length ? 'null' : json;
|
||||||
onChange({ target: { name, value } });
|
onChange({ target: { name, value } });
|
||||||
}}
|
}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user