getDescendants method

List<TKey> getDescendants(
  1. TKey key
)

Returns all descendants of key in pre-order (children, grandchildren, ...). Does not include key itself. Returns an empty list if key has no children or is not present.

Intended for drop-target validation (cycle prevention): a node cannot be reparented under any of its own descendants.

Implementation

List<TKey> getDescendants(TKey key) => _getDescendants(key);