setParent method

void setParent(
  1. String parentId
)

Sets the component's parent.

It's not possible to make a parent-child loop. (its ancestor cannot be its child)

You should use it only with addChild on the parent's component.

Implementation

void setParent(String parentId) {
  this.parentId = parentId;
}