File tree Expand file tree Collapse file tree
packages/ra-ui-materialui/src/list/datagrid Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ const DatagridBody: FC<DatagridBodyProps> = React.forwardRef(
1313 {
1414 children,
1515 className,
16- data,
16+ data = [ ] ,
1717 expand,
18- hasBulkActions,
18+ hasBulkActions = false ,
1919 hover,
2020 onToggleItem,
2121 resource,
22- row,
22+ row = defaultChildren ,
2323 rowClick,
2424 rowStyle,
2525 selectedIds,
@@ -61,6 +61,8 @@ const DatagridBody: FC<DatagridBodyProps> = React.forwardRef(
6161 )
6262) ;
6363
64+ const defaultChildren = < DatagridRow /> ;
65+
6466DatagridBody . propTypes = {
6567 className : PropTypes . string ,
6668 children : PropTypes . node ,
@@ -85,12 +87,6 @@ DatagridBody.propTypes = {
8587 isRowSelectable : PropTypes . func ,
8688} ;
8789
88- DatagridBody . defaultProps = {
89- data : [ ] ,
90- hasBulkActions : false ,
91- row : < DatagridRow /> ,
92- } ;
93-
9490export interface DatagridBodyProps extends Omit < TableBodyProps , 'classes' > {
9591 className ?: string ;
9692 data ?: any [ ] ;
You can’t perform that action at this time.
0 commit comments