Skip to content

Commit

Permalink
Added paging slice to filtered table (#4349)
Browse files Browse the repository at this point in the history
  • Loading branch information
edewit authored Feb 8, 2023
1 parent abc7306 commit 0697c7d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions apps/admin-ui/src/components/table-toolbar/KeycloakDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,16 @@ export function KeycloakDataTable<T>({
() =>
search === "" || isPaginated
? undefined
: convertToColumns(unPaginatedData || []).filter((row) =>
row.cells.some(
(cell) =>
cell &&
getNodeText(cell).toLowerCase().includes(search.toLowerCase())
: convertToColumns(unPaginatedData || [])
.filter((row) =>
row.cells.some(
(cell) =>
cell &&
getNodeText(cell).toLowerCase().includes(search.toLowerCase())
)
)
),
[search]
.slice(first, first + max + 1),
[search, first, max]
);

useEffect(() => {
Expand Down

0 comments on commit 0697c7d

Please sign in to comment.