Skip to content

Commit df75c63

Browse files
committed
Merge branch '9112-destructuring-defaultprops' of github.com:marmelab/react-admin into 9112-destructuring-defaultprops
2 parents 65a69e1 + 78fc5d6 commit df75c63

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

packages/ra-ui-materialui/src/field/ReferenceField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ ReferenceField.propTypes = {
103103
PropTypes.string,
104104
PropTypes.bool,
105105
PropTypes.func,
106-
]).isRequired,
106+
]),
107107
};
108108

109109
export interface ReferenceFieldProps<

packages/ra-ui-materialui/src/field/ReferenceManyField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ ReferenceManyField.propTypes = {
128128
resource: PropTypes.string,
129129
sortBy: PropTypes.string,
130130
sortByOrder: fieldPropTypes.sortByOrder,
131-
source: PropTypes.string.isRequired,
131+
source: PropTypes.string,
132132
sort: PropTypes.exact({
133133
field: PropTypes.string,
134134
order: PropTypes.string,

packages/ra-ui-materialui/src/list/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ List.propTypes = {
108108
]),
109109
// @ts-ignore-line
110110
pagination: PropTypes.oneOfType([PropTypes.element, PropTypes.bool]),
111-
perPage: PropTypes.number.isRequired,
111+
perPage: PropTypes.number,
112112
//@ts-ignore-line
113113
sort: PropTypes.shape({
114114
field: PropTypes.string,

packages/ra-ui-materialui/src/list/ListActions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ ListActions.propTypes = {
115115
filterValues: PropTypes.object,
116116
hasCreate: PropTypes.bool,
117117
resource: PropTypes.string,
118-
onUnselectItems: PropTypes.func.isRequired,
118+
onUnselectItems: PropTypes.func,
119119
selectedIds: PropTypes.arrayOf(PropTypes.any),
120120
showFilter: PropTypes.func,
121121
total: PropTypes.number,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ DatagridBody.propTypes = {
6767
className: PropTypes.string,
6868
children: PropTypes.node,
6969
// @ts-ignore
70-
data: PropTypes.arrayOf(PropTypes.object).isRequired,
70+
data: PropTypes.arrayOf(PropTypes.object),
7171
// @ts-ignore
7272
expand: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]),
73-
hasBulkActions: PropTypes.bool.isRequired,
73+
hasBulkActions: PropTypes.bool,
7474
hover: PropTypes.bool,
7575
onToggleItem: PropTypes.func,
7676
resource: PropTypes.string,
@@ -118,8 +118,8 @@ const defaultData = [];
118118
// @ts-ignore
119119
DatagridBody.muiName = 'TableBody';
120120

121-
export const PureDatagridBody = memo(() => (
122-
<DatagridBody row={<PureDatagridRow />} />
121+
export const PureDatagridBody = memo(props => (
122+
<DatagridBody row={<PureDatagridRow />} {...props} />
123123
));
124124

125125
// trick Material UI Table into thinking this is one of the child type it supports

0 commit comments

Comments
 (0)