Skip to content

Commit fe1239e

Browse files
committed
[no ci] [Doc] Add section to explain how to display an empty list
1 parent c3aca3f commit fe1239e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/List.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,4 +1006,17 @@ const PostList = () => (
10061006
);
10071007
```
10081008

1009-
The list will automatically update when a new record is created, or an existing record is updated or deleted.
1009+
The list will automatically update when a new record is created, or an existing record is updated or deleted.
1010+
1011+
## How to render an empty list
1012+
You can set the `empty` props value to `false` to bypass the empty page display and render an empty list instead.
1013+
1014+
```tsx
1015+
import { List } from 'react-admin';
1016+
1017+
const ProductList = () => (
1018+
<List empty={false}>
1019+
...
1020+
</List>
1021+
)
1022+
```

0 commit comments

Comments
 (0)