RATreeView icon indicating copy to clipboard operation
RATreeView copied to clipboard

Is there any way to expand the all cells ?

Open JoleneLiu opened this issue 7 years ago • 4 comments

JoleneLiu avatar Sep 07 '17 01:09 JoleneLiu

        vm.topLVL.forEach { (item) in
            treeView.expandRow(forItem: item)
        }

Maxatma avatar Sep 07 '17 14:09 Maxatma

thank for @Maxatma , I've had the fix issue in this way .

JoleneLiu avatar Sep 13 '17 10:09 JoleneLiu

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.

Dirk- avatar Oct 03 '17 15:10 Dirk-

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()
}

Kirow avatar Dec 26 '17 15:12 Kirow