Sochettra / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

When set parent to be selected it's children not selected too #294

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

when i set the parent to be selected in select mode 3 it's children should be 
selected automatically too but that is not happening 

example :

var treeData = [
        {title: "Folder", select: true, key: "id3",
            children: [
                {title: "Sub-item 1",key: "1"},
                {title: "Sub-item 2",key: "2",}
            ]
        }

    ]; 

here no selection appear at all 

Original issue reported on code.google.com by halfmoon...@gmail.com on 6 Mar 2012 at 12:11

GoogleCodeExporter commented 8 years ago
i fix it using loop php function and 

$('#tree').dynatree('getTree').getNodeByKey('ID_HERE').select();

command , but shouldn't it do it automatically ?

Original comment by halfmoon...@gmail.com on 6 Mar 2012 at 12:38

GoogleCodeExporter commented 8 years ago
no, this is not done automatically, but considered 'inconsistent data'. 
You could argue as well, that the parent should be deselected, when no child 
was selected...

Original comment by moo...@wwwendt.de on 6 Mar 2012 at 6:56