pcirella / dynatree

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

onCheck handler #232

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please include this ability in next release:

opts.onCheck(node);

for calling action on checking node checkbox.

Project is great, very good for usage.

Thanks!

Original issue reported on code.google.com by danijel....@gmail.com on 12 Oct 2011 at 9:51

GoogleCodeExporter commented 9 years ago
What you may be looking for is opts.onSelect(flag, node) or 
("#tree").dynatree({
    […]
    onSelect: function(flag, node) { ... },
    […]
});

Original comment by arw...@gmail.com on 12 Oct 2011 at 12:40

GoogleCodeExporter commented 9 years ago
Thanks for answering this.
Danijel, if this doesn't solve your problem, let me know.

Original comment by moo...@wwwendt.de on 12 Oct 2011 at 6:32

GoogleCodeExporter commented 9 years ago
@arw 

this callback you can use only in selectMode 2 (multi-selection)
But for my purpose is that not enough. I need selectMode 1 for my purpose.

And when you have selectMode 1, onSelect doesn't work when you click on 
checkbox.

Original comment by danijel....@gmail.com on 13 Oct 2011 at 7:52

GoogleCodeExporter commented 9 years ago
hmm, onSelect should fire in all select modes, I'll have a look at it.

You could try
    onClick(node, event)
instead, and check for
    node.getEventTargetType(event) == "checkbox"

Original comment by moo...@wwwendt.de on 13 Oct 2011 at 6:30

GoogleCodeExporter commented 9 years ago
onClick(node, event)
    node.getEventTargetType(event) == "checkbox"
i alredy use this workaround. 

But is better and cleaner solution onCheck callback, you dont't think so?

Thx

Original comment by danijel....@gmail.com on 14 Oct 2011 at 8:50

GoogleCodeExporter commented 9 years ago
I checked with the select sample

    http://wwwendt.de/tech/dynatree/doc/sample-select.html#

(first tree, selectMode=1) and onSelect events seem to work.
Can you please give more details?

Original comment by moo...@wwwendt.de on 28 Dec 2011 at 10:50

GoogleCodeExporter commented 9 years ago
Deferred, so v1.2.1 can be released shortly.

Original comment by moo...@wwwendt.de on 6 Jun 2012 at 7:47

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Closing 'Waiting' issues without timely answer

Original comment by moo...@wwwendt.de on 6 Oct 2013 at 2:09

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 3 May 2014 at 4:37