removeChild(child_or_index, [recursive])

Class: ContextMenu. Method inherited from ContainerComponent.

Description:

Removes component's child by child object or child index.

Parameters:

Name Type Default Description

child_or_index

object | number

Child component object or index of the child.

[recursive]

boolean

false

Boolean indicates if all descendents of this child should also be removed.

Returns:

The removed child component, or null if there is no child at specified index.

Type: UIComponent | null