-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Mobile 4802 #4405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Mobile 4802 #4405
Conversation
b512a1a
to
12d4750
Compare
@@ -80,7 +80,7 @@ export class CoreDynamicComponent<ComponentClass> implements OnChanges, DoCheck, | |||
setTimeout(() => this.createComponent()); | |||
} | |||
|
|||
protected promisedInstance = new CorePromisedValue<any>(); // eslint-disable-line @typescript-eslint/no-explicit-any | |||
promisedInstance = new CorePromisedValue<any>(); // eslint-disable-line @typescript-eslint/no-explicit-any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this change, you can wait the instance to be ready() (awaiting) and the use the get instance()
@@ -34,7 +34,7 @@ import { CoreSharedModule } from '@/core/shared.module'; | |||
}) | |||
export class CoreBlockComponent implements OnChanges, OnDestroy { | |||
|
|||
@ViewChild(CoreDynamicComponent) dynamicComponent?: CoreDynamicComponent<ICoreBlockComponent>; | |||
dynamicComponent: Signal<CoreDynamicComponent<ICoreBlockComponent> | undefined> = viewChild(CoreDynamicComponent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's preferably to infer the type from the viewChild(...) can you move the type there?
const dynamicComponent = this.block()?.dynamicComponent(); | ||
|
||
if (dynamicComponent) { | ||
this.myOverviewBlock = await dynamicComponent.promisedInstance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the other commit about the promisedInstance
No description provided.