diff --git a/packages/ra-core/src/controller/useListController.ts b/packages/ra-core/src/controller/useListController.ts index c2bab23e8d0..d406a495e2a 100644 --- a/packages/ra-core/src/controller/useListController.ts +++ b/packages/ra-core/src/controller/useListController.ts @@ -60,7 +60,7 @@ export interface ListControllerProps { exporter?: Exporter | false; filter?: FilterPayload; filterValues: any; - hasCreate: boolean; + hasCreate?: boolean; hideFilter: (filterName: string) => void; ids: Identifier[]; loading: boolean; diff --git a/packages/ra-ui-materialui/src/list/List.tsx b/packages/ra-ui-materialui/src/list/List.tsx index df7f56441c7..8359e12118d 100644 --- a/packages/ra-ui-materialui/src/list/List.tsx +++ b/packages/ra-ui-materialui/src/list/List.tsx @@ -96,10 +96,10 @@ List.propTypes = { title: TitlePropType, // the props managed by react-admin authProvider: PropTypes.func, - hasCreate: PropTypes.bool.isRequired, - hasEdit: PropTypes.bool.isRequired, - hasList: PropTypes.bool.isRequired, - hasShow: PropTypes.bool.isRequired, + hasCreate: PropTypes.bool, + hasEdit: PropTypes.bool, + hasList: PropTypes.bool, + hasShow: PropTypes.bool, location: PropTypes.any, match: PropTypes.any, path: PropTypes.string,