mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(core): missing parameter for once event listeners (#10715)
This commit is contained in:
committed by
GitHub
parent
50019ecd30
commit
852011c4f9
@@ -17,10 +17,10 @@ export abstract class ScrollViewBase extends ContentView implements ScrollViewDe
|
||||
|
||||
private _addedScrollEvent = false;
|
||||
|
||||
public addEventListener(arg: string, callback: (data: EventData) => void, thisArg?: any): void {
|
||||
public addEventListener(arg: string, callback: (data: EventData) => void, thisArg?: any, once?: boolean): void {
|
||||
const hasExistingScrollListeners: boolean = this.hasListeners(ScrollViewBase.scrollEvent);
|
||||
|
||||
super.addEventListener(arg, callback, thisArg);
|
||||
super.addEventListener(arg, callback, thisArg, once);
|
||||
|
||||
// This indicates that a scroll listener was added for first time
|
||||
if (!hasExistingScrollListeners && this.hasListeners(ScrollViewBase.scrollEvent)) {
|
||||
|
||||
Reference in New Issue
Block a user