From 8a86cfb7050989e914fa85ccc1ea755d73f58c90 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 7 Oct 2021 14:36:21 -0400 Subject: [PATCH] fix(infinite-scroll): infinite scroll event now fired with custom elements build (#24043) resolves #24034 --- core/src/components/infinite-scroll/infinite-scroll.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/components/infinite-scroll/infinite-scroll.tsx b/core/src/components/infinite-scroll/infinite-scroll.tsx index 08e6ecbbb30..f9e6c5558ac 100644 --- a/core/src/components/infinite-scroll/infinite-scroll.tsx +++ b/core/src/components/infinite-scroll/infinite-scroll.tsx @@ -1,6 +1,7 @@ import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h, readTask, writeTask } from '@stencil/core'; import { getIonMode } from '../../global/ionic-global'; +import { componentOnReady } from '../../utils/helpers'; @Component({ tag: 'ion-infinite-scroll', @@ -82,6 +83,7 @@ export class InfiniteScroll implements ComponentInterface { console.error(' must be used inside an '); return; } + await new Promise(resolve => componentOnReady(contentEl, resolve)); this.scrollEl = await contentEl.getScrollElement(); this.thresholdChanged(); this.disabledChanged();