RATreeView
RATreeView copied to clipboard
Is there any way to expand the all cells ?
vm.topLVL.forEach { (item) in
treeView.expandRow(forItem: item)
}
thank for @Maxatma , I've had the fix issue in this way .
For Objective C (fits with RATreeViewBasicExample
):
for (id item in self.data) {
[self.treeView expandRowForItem:item expandChildren:TRUE withRowAnimation:RATreeViewRowAnimationLeft];
}
If you just call expandRow
the children will not get expanded.
Is it possible to apply this w/o animation?
I've tried
tableView.reloadData()
for item in items {
tableView.expandRow(forItem: item, expandChildren: true, with: RATreeViewRowAnimationNone)
}
but I have animation any way. I want something like reloadDataExpandAll()
Does it possible with current source code?
UPD: found working solution in another issue discussion:
tableView.reloadData()
tableView.beginUpdates()
for item in items {
tableView.expandRow(forItem: item, expandChildren: true, with: RATreeViewRowAnimationNone)
}
UIView.performWithoutAnimation {
tableView.endUpdates()
}