feat(ws): fix workspaces table pagination (#506)

Signed-off-by: paulovmr <832830+paulovmr@users.noreply.github.com>
This commit is contained in:
Paulo Rego 2025-07-29 16:19:47 -03:00 committed by Bhakti Narvekar
parent 7bed0beec1
commit 7a6bb30e76
1 changed files with 122 additions and 120 deletions

View File

@ -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}