Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Mobile 4802 #4405

wants to merge 3 commits into from

Conversation

alfonso-salces
Copy link
Member

No description provided.

@alfonso-salces alfonso-salces marked this pull request as ready for review July 14, 2025 09:35
@@ -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
Copy link
Member

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);
Copy link
Member

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;
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants