OptionalgetChildren?: undefinedOptionalgetParents?: undefinedOptionalisParent?: undefinedOptionallist?: undefinedProvides a tree in the "native" format of TreeListCore/TreeList/DataTable.
Note: TreeListCore assumes that all parent and children props are consistent with
each other, e.g. that tree[i].children[j].parent === tree[i]. It will malfunction
otherwise.
Note: This is TreeItemM rather than TreeItem because TreeListCore (via
flattenToList) will sort sublists mutably when there is no filter applied.
OptionalgetParents?: undefinedOptionalisParent?: undefinedOptionaltree?: undefinedOptionalgetChildren?: undefinedList of items to display. If getParents is provided, then items with parents
are not displayed at the root level (they are nested inside their parents);
otherwise, all items in this list are displayed at the root level and there
may be additional items (not in this list) nested inside them if getChildren
returns items.
Optionaltree?: undefinedGets the parents of an item (that is, the path to reach the item). The parents must
be listed in order from root to child. This function is only called for items in the
list, not for items returned by getParents itself.
Example: getParents={filename => getParentPathsOf(filename, '/', false)}
getParents by itself gives you no way to indicate that an item is a parent
without children (e.g. an empty folder). If this function returns true, an item's
expansion icon is displayed even when it has no children. This property is unused
if you don't provide getParents. TODO: if isParent and getChildren are both
provided, we shouldn't call getChildren() for unexpanded nodes. In fact, right
now all unexpanded nodes are retrieved recursively which is wasteful.
Describes the items to display including parent-child relationships. You can either provide a
treedirectly, or a list withgetChildren/getParentsfunctions to describe these relationships.