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 was 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
}