From 3dff649881991a4f99744b351e9318c6b91a45fb Mon Sep 17 00:00:00 2001 From: Ovidijus Parsiunas Date: Fri, 16 Feb 2024 23:01:43 +0000 Subject: [PATCH] using internal pagination object to get up to date rowsPerPage value --- .../dropdown/rowsPerPageDropdownItemEvents.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component/src/elements/pagination/rowsPerPageSelect/dropdown/rowsPerPageDropdownItemEvents.ts b/component/src/elements/pagination/rowsPerPageSelect/dropdown/rowsPerPageDropdownItemEvents.ts index db1ce578..7978e1ba 100644 --- a/component/src/elements/pagination/rowsPerPageSelect/dropdown/rowsPerPageDropdownItemEvents.ts +++ b/component/src/elements/pagination/rowsPerPageSelect/dropdown/rowsPerPageDropdownItemEvents.ts @@ -6,13 +6,13 @@ import {ActiveTable} from '../../../../activeTable'; export class RowsPerPageDropdownItemEvents { private static action(pagination: PaginationInternal, optionsButton: HTMLElement, at: ActiveTable, targetText: string) { - if ((pagination as PaginationInternal).rowsPerPage !== Number(targetText)) { + if (pagination.rowsPerPage !== Number(targetText)) { RowsPerPageDropdownItemUtil.setNewRowsPerPage(at, optionsButton, targetText); } } public static setEvents(at: ActiveTable, item: HTMLElement, optionsButton: HTMLElement) { - const actionFunc = RowsPerPageDropdownItemEvents.action.bind(this, at.pagination as PaginationInternal, optionsButton); + const actionFunc = RowsPerPageDropdownItemEvents.action.bind(this, at._pagination, optionsButton); const hideFunc = OuterDropdownSimpleUtils.hide; item.onmousedown = OuterDropdownItemEvents.itemMouseDownCommon.bind(at, actionFunc, hideFunc); }