diff --git a/packages/ra-ui-materialui/src/detail/Edit.stories.tsx b/packages/ra-ui-materialui/src/detail/Edit.stories.tsx index d09038a91e..99754263f9 100644 --- a/packages/ra-ui-materialui/src/detail/Edit.stories.tsx +++ b/packages/ra-ui-materialui/src/detail/Edit.stories.tsx @@ -239,3 +239,45 @@ export const Default = () => ( ); + +export const emptyWhileLoading = () => { + // getOne: () => new Promise(() => setTimeout(dataProvider.getOne, 1000)), + const customDataProvider = { + getOne: () => + new Promise(resolve => + setTimeout( + () => + resolve({ + data: { + id: 1, + title: 'War and Peace', + author: 'Leo Tolstoy', + summary: + "War and Peace broadly focuses on Napoleon's invasion of Russia, and the impact it had on Tsarist society. The book explores themes such as revolution, revolution and empire, the growth and decline of various states and the impact it had on their economies, culture, and society.", + year: 1869, + }, + }), + 2000 + ) + ), + } as any; + return ( + + + ( + + + + + + + + + )} + /> + + + ); +};