From b05a1a0f960097b2bd8ab6f63a0faf88bdafb525 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kaiser Date: Tue, 17 Dec 2024 09:56:32 +0100 Subject: [PATCH] [no ci] minor improvements to story --- .../src/form/FormDataConsumer.stories.tsx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/ra-ui-materialui/src/form/FormDataConsumer.stories.tsx b/packages/ra-ui-materialui/src/form/FormDataConsumer.stories.tsx index 457d50857b..e05cd50afe 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.'), + ]} + /> + + ); }}