Skip to content

Commit

Permalink
Verify test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
alansemenov committed Jul 25, 2023
1 parent 149df96 commit 8756ec6
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/main/resources/assets/admin/common/js/ui/grid/Grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class Grid<T extends Slick.SlickData>
private checkboxSelectorPlugin: Slick.CheckboxSelectColumn<T>; // CheckboxSelectColumn
private rowManagerPlugin: Slick.RowMoveManager<T>; // RowMoveManager
private debounceSelectionChange: boolean;
private onClickListeners: ((e: any, args: any) => void) [] = [];
private onClickListeners: ((e: MouseEvent, args: unknown) => void) [] = [];

constructor(dataView: DataView<T>, gridColumns?: GridColumn<T>[], gridOptions?: GridOptions<T>) {
super('grid');
Expand Down Expand Up @@ -83,9 +83,7 @@ export class Grid<T extends Slick.SlickData>
// The only way to dataIdProperty before adding items
this.dataView.setItems([], options.getDataIdProperty());

let clickListener = AppHelper.debounce((e, args) => {
this.notifyClicked(e, args);
}, 50);
let clickListener = AppHelper.debounce((e, args) => this.notifyClicked(e, args), 50);

this.slickGrid.onClick.subscribe(clickListener);
}
Expand Down Expand Up @@ -532,14 +530,10 @@ export class Grid<T extends Slick.SlickData>
this.loadMask = new LoadMask(this);
this.getParentElement().appendChild(this.loadMask);

this.loadMask.onRemoved(() => {
this.loadMask = null;
});
this.loadMask.onRemoved(() => this.loadMask = null);
}

private notifyClicked(e: any, args: any) {
this.onClickListeners.forEach((listener: (e: any, args: any) => void) => {
listener(e, args);
});
private notifyClicked(e: MouseEvent, args: unknown) {
this.onClickListeners.forEach((listener: (e: MouseEvent, args: unknown) => void) => listener(e, args));
}
}

0 comments on commit 8756ec6

Please sign in to comment.