MOBILE-3099 core: Improve collapsible headers loading search
parent
a19bb744d9
commit
132007b207
|
@ -48,8 +48,12 @@ export class CoreCollapsibleHeaderDirective implements OnDestroy {
|
||||||
this.header = el.nativeElement;
|
this.header = el.nativeElement;
|
||||||
|
|
||||||
this.loadingObserver = CoreEvents.on(CoreEvents.CORE_LOADING_CHANGED, async (data) => {
|
this.loadingObserver = CoreEvents.on(CoreEvents.CORE_LOADING_CHANGED, async (data) => {
|
||||||
|
if (!data.loaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const loadingId = await this.getLoadingId();
|
const loadingId = await this.getLoadingId();
|
||||||
if (loadingId && data.loaded && data.uniqueId == loadingId) {
|
if (loadingId && data.uniqueId == loadingId) {
|
||||||
// Remove event when loading is done.
|
// Remove event when loading is done.
|
||||||
this.loadingObserver.off();
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue