sridhars711 / dynatree

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

Folder selection on initialization fails #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a dynatree with selectMode : 3 (=checkboxes)
2. Create a <li> structure for transferring your data
<ul id="treeData" style="display: none;">
        <li id="id1" class="selected folder">Blue
        <ul>
                <li id="id2">Light blue
                <li id="id3">Dark blue
        </ul>
        <li id="id4" class="selected folder">Black
</ul> 

What is the expected output? What do you see instead?
The expected output : a tree with two selected folders, and two selected
childs.
What you see : nothing is selected

What version of the product are you using?
rc 4.0
On what operating system and browser?
Windows Vista, Firefox

Original issue reported on code.google.com by katy.sm...@gmail.com on 13 Mar 2009 at 12:11

GoogleCodeExporter commented 9 years ago
Assuming selectMode: 3 (multi-hier):
this behaviour is by design:
If a folder has class "selected", and has a child node that is not marked 
"selected",
then the child is considered 'deselected'.
Deselecting a child will deselect the parent.

Still this feels like a bug.
A node without class='select' should not fire a 'select(false)' event.

When initializing from ojects instead of LI tags, we should distinguish
data.selected: true, false and undefined.

Original comment by moo...@wwwendt.de on 14 Mar 2009 at 6:11

GoogleCodeExporter commented 9 years ago
Fixed with r202

Original comment by moo...@wwwendt.de on 23 Mar 2009 at 11:36

GoogleCodeExporter commented 9 years ago
considered verified

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:12