You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a refComponent that is not in your main template
That has a child refComponent that is an icon
using bindTemplate, render some HTML that contains the child component and within it a template
observe that the icon component is first registered globally (right after the bindTemplate)
and after that, the child and icon components are inited
causing an error in the console with This refComponent does already exist as part of another parent
The existing check if (existingComponent.__instance.parent?.uid === 0) doesn't work, since the first component is registered as its parent, and not the root.
Two options:
Register the root as parent of global components, so the check works
Keep the current "parent" in there, but find another way to detect globally registered components
Not sure if it's useful to know which parent "owned" the piece of HTML that resulted in the globally registered component.
Additionally, it would be good to investigate the component initialisation of bindTemplate vs global components, maybe the order could be turned around?
The text was updated successfully, but these errors were encountered:
Use case:
refComponent
that is not in your main templaterefComponent
that is an iconbindTemplate
, render some HTML that contains the child component and within it a templatebindTemplate
)This refComponent does already exist as part of another parent
The existing check
if (existingComponent.__instance.parent?.uid === 0)
doesn't work, since the first component is registered as its parent, and not the root.Two options:
Not sure if it's useful to know which parent "owned" the piece of HTML that resulted in the globally registered component.
Additionally, it would be good to investigate the component initialisation of bindTemplate vs global components, maybe the order could be turned around?
The text was updated successfully, but these errors were encountered: