Skip to content

Commit

Permalink
[marmelab#2399] chore: hardcode TablePaginationAction proptypes
Browse files Browse the repository at this point in the history
The import

```
import TablePaginationActions from '@material-ui/core/TablePaginationActions';
```

does not work anymore in material-ui’s more recent versions, as per
mui/material-ui#13524.

This commit makes transitioning from `[email protected]` to `3.5.1` easier.
  • Loading branch information
phacks committed Nov 21, 2018
1 parent a994ab2 commit 35e494e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/ra-ui-materialui/src/list/PaginationActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,21 @@ export class PaginationActions extends Component {
}
}

PaginationActions.propTypes = TablePaginationActions.propTypes;
/**
* PaginationActions propTypes are copied over from material-ui’s
* TablePaginationActions propTypes. See
* https://github.com/mui-org/material-ui/blob/869692ecf3812bc4577ed4dde81a9911c5949695/packages/material-ui/src/TablePaginationActions/TablePaginationActions.js#L53-L85
* for reference.
*/
PaginationActions.propTypes = {
backIconButtonProps: PropTypes.object,
count: PropTypes.number.isRequired,
nextIconButtonProps: PropTypes.object,
onChangePage: PropTypes.func.isRequired,
page: PropTypes.number.isRequired,
rowsPerPage: PropTypes.number.isRequired,
theme: PropTypes.object.isRequired,
};

const enhance = compose(
pure,
Expand Down

0 comments on commit 35e494e

Please sign in to comment.