feat(ws): fix workspaces table pagination (#506)
Signed-off-by: paulovmr <832830+paulovmr@users.noreply.github.com>
This commit is contained in:
parent
7bed0beec1
commit
7a6bb30e76
|
|
@ -548,7 +548,9 @@ const WorkspaceTable = React.forwardRef<WorkspaceTableRef, WorkspaceTableProps>(
|
||||||
</Tr>
|
</Tr>
|
||||||
</Thead>
|
</Thead>
|
||||||
{sortedWorkspaces.length > 0 &&
|
{sortedWorkspaces.length > 0 &&
|
||||||
sortedWorkspaces.map((workspace, rowIndex) => (
|
sortedWorkspaces
|
||||||
|
.slice(perPage * (page - 1), perPage * page)
|
||||||
|
.map((workspace, rowIndex) => (
|
||||||
<Tbody
|
<Tbody
|
||||||
id="workspaces-table-content"
|
id="workspaces-table-content"
|
||||||
key={rowIndex}
|
key={rowIndex}
|
||||||
|
|
@ -679,7 +681,7 @@ const WorkspaceTable = React.forwardRef<WorkspaceTableRef, WorkspaceTableProps>(
|
||||||
)}
|
)}
|
||||||
</Table>
|
</Table>
|
||||||
<Pagination
|
<Pagination
|
||||||
itemCount={333}
|
itemCount={sortedWorkspaces.length}
|
||||||
widgetId="bottom-example"
|
widgetId="bottom-example"
|
||||||
perPage={perPage}
|
perPage={perPage}
|
||||||
page={page}
|
page={page}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue