ComponentEx.hasChild method
ComponentEx › hasChild
Checks whether a component is a direct child of this one.Only DIRECT children are reported — this is an ownership question, not a containment one. The caller that needs it is one holding several parents and deciding which of them a component belongs to, and for that a grandchild is the wrong answer: removing it from the parent that merely contains its parent would fail.
Signature:
hasChild(component: Component): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
| component | Component | The component to look for. |
Returns: boolean — Whether the component is a direct child of this one.