Wraps an Array data source with a common API for use with UI controls that support hierarchical data, such as TreeView or TreeGridView.

Events:

openfl.events.Event.CHANGE

Dispatched when the collection changes.

feathers.events.HierarchicalCollectionEvent.ADD_ITEM

Dispatched when an item is added to the collection.

feathers.events.HierarchicalCollectionEvent.REMOVE_ITEM

Dispatched when an item is removed from the collection.

feathers.events.HierarchicalCollectionEvent.REPLACE_ITEM

Dispatched when an item is replaced in the collection.

feathers.events.HierarchicalCollectionEvent.REMOVE_ALL

Dispatched when all items are removed from the collection.

feathers.events.HierarchicalCollectionEvent.RESET

Dispatched when the source of the collection is changed.

feathers.events.HierarchicalCollectionEvent.UPDATE_ITEM

Dispatched when IHierarchicalCollection.updateItem() is called.

feathers.events.HierarchicalCollectionEvent.UPDATE_ALL

Dispatched when IHierarchicalCollection.updateAll() is called.

feathers.events.HierarchicalCollectionEvent.FILTER_CHANGE

Dispatched when IHierarchicalCollection.filterFunction is changed.

feathers.events.HierarchicalCollectionEvent.SORT_CHANGE

Dispatched when IHierarchicalCollection.sortCompareFunction is changed.

Available since

1.0.0

.

See also:

Constructor

new(?array:Array<TreeNode<T>>)

Creates a new TreeCollection object with the given arguments.

Available since

1.0.0

.

Variables

array:Array<TreeNode<T>>

The Array<TreeNode> data source for this collection.

The following example replaces the data source with a new array:

collection.array = [];
Available since

1.0.0

.

Methods