Skip to content

Commit

Permalink
extract an interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii committed Mar 18, 2024
1 parent c3ae3b6 commit 3b4ed65
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/x-data-grid/src/components/GridPagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ const GridPaginationRoot = styled(TablePagination)(({ theme }) => ({

type MutableArray<A> = A extends readonly (infer T)[] ? T[] : never;

interface GridPaginationOwnProps {
component?: React.ElementType;
}

const GridPagination = React.forwardRef<
unknown,
Partial<
// See https://github.com/mui/material-ui/issues/40427
Omit<TablePaginationProps, 'component'> & { component?: React.ElementType }
>
Omit<TablePaginationProps, 'component'>
> &
GridPaginationOwnProps
>(function GridPagination(props, ref) {
const apiRef = useGridApiContext();
const rootProps = useGridRootProps();
Expand Down

0 comments on commit 3b4ed65

Please sign in to comment.