You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.
What you were expecting:
ex. <BooleanInput label="OnOrOff" source="example" defaultValue={false} />
Setting defaultValue on BooleanInput component to false will yield {value: false} in validate function. Fields with defaultValue should be set before validate function runs.
What happened instead:
In: <BooleanInput label="OnOrOff" source="example" defaultValue={false} />
yields: {} in validate function.
Removing defaultValue prop yields same result. Setting defaultValue={true} yields expected result {example: true}
Toggling the BooleanInput field on and then off yields expected result {value: false} Steps to reproduce:
Create a simple form. Console.log values in validateForm
const validateForm => values => {
console.log('values', values) // <- will yield empty object for boolean fields that have not been toggled
}
What you were expecting:
ex.
<BooleanInput label="OnOrOff" source="example" defaultValue={false} />
Setting defaultValue on BooleanInput component to
false
will yield{value: false}
in validate function. Fields withdefaultValue
should be set before validate function runs.What happened instead:
In:
<BooleanInput label="OnOrOff" source="example" defaultValue={false} />
yields:
{}
in validate function.Removing
defaultValue
prop yields same result. SettingdefaultValue={true}
yields expected result{example: true}
Toggling the BooleanInput field on and then off yields expected result
{value: false}
Steps to reproduce:
Create a simple form. Console.log values in
validateForm
See: https://codesandbox.io/s/9856oq8l0p
Click + and view consoled values.
Environment
The text was updated successfully, but these errors were encountered: