We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
<SingleFieldList empty>
1 parent 437af04 commit a450382Copy full SHA for a450382
packages/ra-ui-materialui/src/list/SingleFieldList.tsx
@@ -77,11 +77,7 @@ export const SingleFieldList = (inProps: SingleFieldListProps) => {
77
}
78
79
if (data == null || data.length === 0 || total === 0) {
80
- if (empty) {
81
- return empty;
82
- }
83
-
84
- return null;
+ return empty ?? null;
85
86
87
return (
@@ -135,7 +131,7 @@ export const SingleFieldList = (inProps: SingleFieldListProps) => {
135
131
export interface SingleFieldListProps<RecordType extends RaRecord = any>
136
132
extends StackProps {
137
133
className?: string;
138
- empty?: React.ReactElement;
134
+ empty?: React.ReactNode;
139
linkType?: string | false;
140
children?: React.ReactNode;
141
// can be injected when using the component without context
0 commit comments