angular-tree-component icon indicating copy to clipboard operation
angular-tree-component copied to clipboard

After node selection 'getActiveNodes()' returns empty array

Open showoffer opened this issue 9 years ago • 8 comments

Angular 2.4.4 Angular2-tree-component 3.1.0

After 2.8.0 -> 3.1.0 upgrade getActiveNodes() returns an empty array. In 2.8.0 this method returned an array of selected nodes.

showoffer avatar Feb 27 '17 15:02 showoffer

Bug with getting number indexes as strings. Will be solved soon Thanks for reporting.

adamkleingit avatar Mar 01 '17 23:03 adamkleingit

You can work with treeModel.activeNodeIds in the meantime until fixed, or keep track of the active nodes using events.

adamkleingit avatar Mar 01 '17 23:03 adamkleingit

@adamkleingit thank you. I will switch to the new version after next more or less stable release.

showoffer avatar Mar 02 '17 13:03 showoffer

Same here. activeNodeIds works fine.

svcninja avatar Mar 06 '17 17:03 svcninja

Fixed in 3.2.1 - please upgrade

adamkleingit avatar Mar 07 '17 14:03 adamkleingit

@adamkleingit thank you!

showoffer avatar Mar 09 '17 14:03 showoffer

@adamkleingit Hi! I have the same issue and I am using the version ^5.0.0. I am using Angular v 4.4.0.

const nodes = tree.treeModel.getActiveNodes();

It is invoked when I click a button and I click this button when I already click some checkboxes but this code return me empty Array. Why?

If I use tree.treeModel.activateNodeIds I have the next return:

Object {$mobx: ObservableObjectAdministration}

PD: My ids are type number.

cristianpoleyJS avatar Oct 02 '17 09:10 cristianpoleyJS

me too not working when I'm used getActiveNodes(); so I try with getFocusedNode() then it work and return node data.

illiden avatar May 03 '18 04:05 illiden