mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
Start of virtual scrolling for lists
This commit is contained in:
@ -15,5 +15,19 @@ export class Content {
|
||||
// but we should be able to stamp out this behavior with a base IonicComponent
|
||||
// or something, so all elements have a domElement reference or a getElement() method
|
||||
this.domElement = elementRef.domElement;
|
||||
|
||||
setTimeout(() => {
|
||||
this.scrollElement = this.domElement.children[0];
|
||||
});
|
||||
}
|
||||
|
||||
addScrollEventListener(handler) {
|
||||
if(!this.scrollElement) { return; }
|
||||
|
||||
this.scrollElement.addEventListener('scroll', handler);
|
||||
|
||||
return () => {
|
||||
this.scrollElement.removeEventListener('scroll', handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user