jQsafi / dynatree

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

inconsistent behavior for selectMode: 3 in combination with isLazy: true nodes #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Thanks for that plugin, its really fast and feature still easy to use!

When in selectMode: 3, the children of a Node with selected: true and
isLazy: true are not selected when the node is expaned for the first time
and triggering the loading of the child nodes. I think that is inconsistent.

As a workaround this._select(true,false,true); can be called on the child
nodes as shown below.

$("#tree").dynatree({
    checkbox: true,
    selectMode: 3,
    initAjax: {
        url: tree_url,
    },
    onLazyRead: function(dtnode){
        dtnode.appendAjax({
            url: tree_url,
            data: {
                "root": dtnode.data.key
            },
            success: function(dtnode) {
                if(dtnode.isSelected()){
                    $.each(dtnode.childList, function(){
                        this._select(true,false,true);
                    });
                }
            }
        });
    },
    ...
});

Original issue reported on code.google.com by asr.m...@gmail.com on 26 Aug 2009 at 9:34

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 3 Sep 2009 at 5:58

GoogleCodeExporter commented 9 years ago
In your case: did all loaded child nodes have 'selected' set?
Otherwise this may override their parent's selection status.

If so, I wouldn't call this inconsistent. It's simply a question how to 
interpret
contradictionary information.

Your workaraound is a good solution to change this behaviour.
(Another one could be to send the 'selection' events to the server so it can 
update
it's data model.)

Original comment by moo...@wwwendt.de on 19 Sep 2009 at 7:50

GoogleCodeExporter commented 9 years ago
Defered to next update, so drag'n'drop sample is not blocked.

Original comment by moo...@wwwendt.de on 20 Dec 2009 at 10:16

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 15 Mar 2010 at 3:07

GoogleCodeExporter commented 9 years ago
deferred to 0.5.5

Original comment by moo...@wwwendt.de on 30 May 2010 at 7:01

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 8 Nov 2010 at 7:22

GoogleCodeExporter commented 9 years ago
Issue 358 has been merged into this issue.

Original comment by moo...@wwwendt.de on 3 Oct 2012 at 6:35

GoogleCodeExporter commented 9 years ago
Issue 365 has been merged into this issue.

Original comment by moo...@wwwendt.de on 18 Oct 2012 at 6:18

GoogleCodeExporter commented 9 years ago
Issue 364 has been merged into this issue.

Original comment by moo...@wwwendt.de on 18 Oct 2012 at 6:26

GoogleCodeExporter commented 9 years ago
As of 2014 Dynatree is feature frozen.
Please have a look at Fancytree (sequel of DynaTree 1.x): chances are good that 
the problem was resolved / the requested featuer is already implemented.
Please open a new issue there otherwise:

https://github.com/mar10/fancytree

Original comment by moo...@wwwendt.de on 1 May 2014 at 4:38

GoogleCodeExporter commented 9 years ago
Issue 491 has been merged into this issue.

Original comment by moo...@wwwendt.de on 28 Aug 2014 at 5:53