Skip to content

Commit e2da27c

Browse files
committed
extract default data param
1 parent 6b988d9 commit e2da27c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/ra-ui-materialui/src/list/datagrid/DatagridBody.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const DatagridBody: FC<DatagridBodyProps> = React.forwardRef(
1313
{
1414
children,
1515
className,
16-
data = [],
16+
data = defaultData,
1717
expand,
1818
hasBulkActions = false,
1919
hover,
@@ -112,6 +112,8 @@ export interface DatagridBodyProps extends Omit<TableBodyProps, 'classes'> {
112112
isRowSelectable?: (record: RaRecord) => boolean;
113113
}
114114

115+
const defaultData = [];
116+
115117
// trick Material UI Table into thinking this is one of the child type it supports
116118
// @ts-ignore
117119
DatagridBody.muiName = 'TableBody';

0 commit comments

Comments
 (0)