valeriogalano/checkboxtree

onCheck: ancestor: uncheck

Closed this issue · 5 comments

There is a problem in current version (4.2). I wanted to not-check ancestors 
when checking children, so I set onCheck: ancestors: 'uncheck' (also left blank 
'') while initializing the tree. But it didn't work. Whenever I checked 
anything, script was checking all parents of checked node. I dig into your 
code, and saw this on 67 line:

            if (options.checkParents) {
                options.onCheck.ancestors = 'check';
            }

So I set checkParents option as false, and ancestors on onCheck started to work 
as it should (as far with current tests). Didn't dig deeper in code, so you can 
check this piece if it interests you.

Your work is awesome by the way ;)

Original issue reported on code.google.com by anaron.d...@gmail.com on 25 Jan 2011 at 3:12

Hi anaron,
thanks for your report.

You described the normal behaviour of the script: checkParents is as option 
used in version 0.3 and deprecated in 0.4 (I removed it in next 0.5 release).

Probably, the issue arise from poor documentation available. I'm planning to 
improve UserDocs04 to avoid this and other kind of misunderstanding.

Original comment by valerio....@gmail.com on 27 Jan 2011 at 8:17

  • Changed state: Accepted
  • Added labels: Type-Task, Component-Docs
  • Removed labels: Type-Defect
Oh, then there is no error :) English isn't my native language, so probably
I didn't understood well this option.

Original comment by anaron.d...@gmail.com on 27 Jan 2011 at 1:05

No, you don't understand because I didn't specify about it in documentation!

It was my fault.

Original comment by valerio....@gmail.com on 27 Jan 2011 at 1:09

Option checkChildren cause this problem, too.

Original comment by valerio....@gmail.com on 3 Feb 2011 at 9:32

Because I'm working on new release (free from deprecated options...), I added a 
quick and dirty note to UserDocs04.

Original comment by valerio....@gmail.com on 21 Feb 2011 at 5:52

  • Changed state: Done