mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(itemSliding): close items when scrolling content
This commit is contained in:
@@ -73,15 +73,16 @@ export class Content extends Ion {
|
||||
}
|
||||
|
||||
onScrollEnd(callback) {
|
||||
let timerId;
|
||||
let timerId, deregister;
|
||||
|
||||
function debounce() {
|
||||
timerId = setTimeout(() => {
|
||||
|
||||
deregister();
|
||||
callback();
|
||||
}, 250);
|
||||
}
|
||||
|
||||
this.addScrollEventListener(debounce);
|
||||
deregister = this.addScrollEventListener(debounce);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user