animated_tree_view
animated_tree_view copied to clipboard
Question: Is there a way to deactivate "toggleExpansion" ?
Hi, i'm looking for a way to, based on the item, to deactivate the expansion/collapse of its children. Is there a way currently ?
Or is it something you want to achieve? If yes, my suggestion would be something like, i could do the PR:
Future<void> toggleExpansion(ITreeNode<Data> item) async {
if (item.isExpandable == false) {
return;
}
if (item.isExpanded)
await collapseNode(item);
else {
expandNode(item);
await applyExpansionBehavior(item);
}
}
Greets!