diff --git a/packages/ra-ui-materialui/src/form/FormDataConsumer.stories.tsx b/packages/ra-ui-materialui/src/form/FormDataConsumer.stories.tsx index 457d50857ba..e05cd50afe5 100644 --- a/packages/ra-ui-materialui/src/form/FormDataConsumer.stories.tsx +++ b/packages/ra-ui-materialui/src/form/FormDataConsumer.stories.tsx @@ -18,28 +18,28 @@ export const Basic = () => ( > {({ formData }) => { console.log({ formData }); - if (!!formData.title) { - return ( - - - `${choice.name} / (${choice.id})` - } - // optionValue="userId" - noOptionsText="User does'nt exist" - isRequired - validate={[ - required('User is Required.'), - ]} - /> - - ); - } else return null; + if (!formData.title) { + return null; + } + return ( + + + `${choice.name} / (${choice.id})` + } + noOptionsText="User doesn't exist" + isRequired + validate={[ + required('User is required.'), + ]} + /> + + ); }}