Skip to content

Commit

Permalink
Fix warnings about missing props when using <List> as a standalone co…
Browse files Browse the repository at this point in the history
…mponent

Closes #5943
  • Loading branch information
fzaninotto committed Mar 8, 2021
1 parent ae95dad commit cafdd9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/ra-core/src/controller/useListController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface ListControllerProps<RecordType extends Record = Record> {
exporter?: Exporter | false;
filter?: FilterPayload;
filterValues: any;
hasCreate: boolean;
hasCreate?: boolean;
hideFilter: (filterName: string) => void;
ids: Identifier[];
loading: boolean;
Expand Down
8 changes: 4 additions & 4 deletions packages/ra-ui-materialui/src/list/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cafdd9e

Please sign in to comment.