Skip to content

Commit

Permalink
feat: add pagination to commits table
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-stoyanov committed Feb 27, 2021
1 parent 369f867 commit fa9d15d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ui/blocks/src/ComponentCommits/ComponentCommits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ export const ComponentCommits: FC<ComponentCommitsProps> = ({
return null;
}

const paginationProps = {
pageIndex: 0,
pageSize: 10,
pageTemplate: 'Page ${pageIndex} of ${pageLength}',
pageVisible: true,
pageSizeTemplate: '${pageSize} rows',
pageSizeVisible: true,
goToPageVisible: true,
goToPageTemplate: 'Go to page:',
};

return (
<BlockContainer {...props}>
<Table<Commit>
Expand All @@ -104,6 +115,7 @@ export const ComponentCommits: FC<ComponentCommitsProps> = ({
desc: true,
},
]}
pagination={paginationProps}
/>
</BlockContainer>
);
Expand Down

0 comments on commit fa9d15d

Please sign in to comment.