Skip to content

Commit

Permalink
using internal pagination object to get up to date rowsPerPage value
Browse files Browse the repository at this point in the history
  • Loading branch information
OvidijusParsiunas committed Feb 16, 2024
1 parent ae78c39 commit 3dff649
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3dff649

Please sign in to comment.