Added paging slice to filtered table (#4349)
This commit is contained in:
parent
abc7306097
commit
0697c7dd5e
1 changed files with 9 additions and 7 deletions
|
@ -279,14 +279,16 @@ export function KeycloakDataTable<T>({
|
||||||
() =>
|
() =>
|
||||||
search === "" || isPaginated
|
search === "" || isPaginated
|
||||||
? undefined
|
? undefined
|
||||||
: convertToColumns(unPaginatedData || []).filter((row) =>
|
: convertToColumns(unPaginatedData || [])
|
||||||
|
.filter((row) =>
|
||||||
row.cells.some(
|
row.cells.some(
|
||||||
(cell) =>
|
(cell) =>
|
||||||
cell &&
|
cell &&
|
||||||
getNodeText(cell).toLowerCase().includes(search.toLowerCase())
|
getNodeText(cell).toLowerCase().includes(search.toLowerCase())
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
[search]
|
.slice(first, first + max + 1),
|
||||||
|
[search, first, max]
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
Loading…
Reference in a new issue