Fixed pagination bug due to fixed entry (#19075)
This commit is contained in:
parent
46eb2e1b84
commit
0ddb0f9022
1 changed files with 11 additions and 15 deletions
|
@ -176,22 +176,18 @@ export const ClientScopes = ({
|
|||
const filter =
|
||||
searchType === "name" ? nameFilter(search) : typeFilter(searchTypeType);
|
||||
const firstNum = Number(first);
|
||||
const page = localeSort(rows.filter(filter), mapByKey("name")).slice(
|
||||
firstNum,
|
||||
firstNum + Number(max)
|
||||
);
|
||||
if (firstNum === 0 && isManager) {
|
||||
return [
|
||||
{
|
||||
id: DEDICATED_ROW,
|
||||
name: t("dedicatedScopeName", { clientName }),
|
||||
type: AllClientScopes.none,
|
||||
description: t("dedicatedScopeDescription"),
|
||||
},
|
||||
...page,
|
||||
];
|
||||
const page = localeSort(rows.filter(filter), mapByKey("name"));
|
||||
|
||||
if (isManager) {
|
||||
page.unshift({
|
||||
id: DEDICATED_ROW,
|
||||
name: t("dedicatedScopeName", { clientName }),
|
||||
type: AllClientScopes.none,
|
||||
description: t("dedicatedScopeDescription"),
|
||||
});
|
||||
}
|
||||
return page;
|
||||
|
||||
return page.slice(firstNum, firstNum + Number(max));
|
||||
};
|
||||
|
||||
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
|
||||
|
|
Loading…
Reference in a new issue