Boolean if the tree item is expanded. When this is true, it should add
aria-expanded="true"
to the tree item.
Boolean if the tree item is the current keyboard focus.
A DOM id for the tree item. This is required for a11y since this id should
reflect the aria-activedescendant
value on the base Tree
component to
show current keyboard focus.
The current tree item's index within its list at the provided depth. This
will be a number starting from 1
since it should be directly mapped to
"aria-posinset"
.
React key
s aren't really "props", but it will be provided to each
TreeItem
automatically.
A ref that must be passed down to each TreeItem
so that keyboard
accessibility works. This will be omitted when the isCustom
key is
enabled on the item.
The current total list size for the tree item at the provided depth. This
should be mapped directly into "aria-setsize"
.
A click handler that allows for the item to be selected or expanded. This
will be omitted when the isCustom
key is enabled on the item.
Boolean if the tree item is currently selected.
This function will only be provided when the tree item has child tree
items. This function should only be called within the exported TreeGroup
component or in a component that has the role="group"
for accessibility.
Generated using TypeDoc
The current depth that the tree item is being rendered at. This will be a number starting from
1
since it should be directly mapped to"aria-posinset"
.