Skip to content

Commit f12cf20

Browse files
guilbillAijeyomah
authored andcommitted
doc: add missing paragraph
1 parent ec37ade commit f12cf20

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/EditInDialogButton.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,20 @@ const EditButton = () => (
120120
);
121121
```
122122

123+
## `emptyWhileLoading`
124+
125+
By default, `<EditInDialogButton>` renders its child component even before the `dataProvider.getOne()` call returns. It can lead to a flash of empty content.
126+
127+
To avoid this, set the `emptyWhileLoading` prop to `true`:
128+
129+
```jsx
130+
const EditButton = () => (
131+
<EditInDialogButton emptyWhileLoading>
132+
...
133+
</EditInDialogButton>
134+
);
135+
```
136+
123137
## `ButtonProps`
124138

125139
The `ButtonProps` prop allows you to pass props to the MUI `<Button>` component. For instance, to change the color and size of the button:

0 commit comments

Comments
 (0)