Add pagination
This commit is contained in:
parent
99546cd0e7
commit
cf66993434
1 changed files with 12 additions and 0 deletions
|
|
@ -361,6 +361,15 @@ function SearchPage() {
|
|||
}
|
||||
};
|
||||
|
||||
// enables pagination in the grid
|
||||
const pagination = true;
|
||||
|
||||
// sets 25 rows per page (default is 100)
|
||||
const paginationPageSize = 25;
|
||||
|
||||
// allows the user to select the page size from a predefined list of page sizes
|
||||
const paginationPageSizeSelector = [10, 25, 50, 100];
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col h-full">
|
||||
|
|
@ -408,6 +417,9 @@ function SearchPage() {
|
|||
getRowId={(params: GetRowIdParams<File>) => params.data?.filename}
|
||||
domLayout="normal"
|
||||
onSelectionChanged={onSelectionChanged}
|
||||
pagination={pagination}
|
||||
paginationPageSize={paginationPageSize}
|
||||
paginationPageSizeSelector={paginationPageSizeSelector}
|
||||
noRowsOverlayComponent={() => (
|
||||
<div className="text-center pb-[45px]">
|
||||
<div className="text-lg text-primary font-semibold">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue