MOBILE-3099 core: Improve collapsible headers loading search

main
Pau Ferrer Ocaña 2021-12-01 16:19:26 +01:00
parent a19bb744d9
commit 132007b207
1 changed files with 6 additions and 2 deletions

View File

@ -48,8 +48,12 @@ export class CoreCollapsibleHeaderDirective implements OnDestroy {
this.header = el.nativeElement;
this.loadingObserver = CoreEvents.on(CoreEvents.CORE_LOADING_CHANGED, async (data) => {
if (!data.loaded) {
return;
}
const loadingId = await this.getLoadingId();
if (loadingId && data.loaded && data.uniqueId == loadingId) {
if (loadingId && data.uniqueId == loadingId) {
// Remove event when loading is done.
this.loadingObserver.off();
@ -78,7 +82,7 @@ export class CoreCollapsibleHeaderDirective implements OnDestroy {
}
}
return this.content.querySelector('core-loading .core-loading-content')?.id;
return this.content.querySelector('core-loading.core-loading-loaded:not(.core-loading-inline) .core-loading-content')?.id;
}
/**