mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
fix(infinite-scroll): infinite scroll event now fired with custom elements build (#24043)
resolves #24034
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h, readTask, writeTask } from '@stencil/core';
|
import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h, readTask, writeTask } from '@stencil/core';
|
||||||
|
|
||||||
import { getIonMode } from '../../global/ionic-global';
|
import { getIonMode } from '../../global/ionic-global';
|
||||||
|
import { componentOnReady } from '../../utils/helpers';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-infinite-scroll',
|
tag: 'ion-infinite-scroll',
|
||||||
@ -82,6 +83,7 @@ export class InfiniteScroll implements ComponentInterface {
|
|||||||
console.error('<ion-infinite-scroll> must be used inside an <ion-content>');
|
console.error('<ion-infinite-scroll> must be used inside an <ion-content>');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
await new Promise(resolve => componentOnReady(contentEl, resolve));
|
||||||
this.scrollEl = await contentEl.getScrollElement();
|
this.scrollEl = await contentEl.getScrollElement();
|
||||||
this.thresholdChanged();
|
this.thresholdChanged();
|
||||||
this.disabledChanged();
|
this.disabledChanged();
|
||||||
|
Reference in New Issue
Block a user