CHECKBOX cascading and disabled state - please share your opinion

1,007 views
Skip to first unread message

Ivan Bozhanov

unread,
Jul 7, 2014, 6:51:03 AM7/7/14
to jst...@googlegroups.com
Recently an issue came up with checkbox: https://github.com/vakata/jstree/issues/747

The problem is that if cascading is enabled then if a parent has a disabled node as a child, if you select the parent, the disabled node will be selected.
The same goes the other way around - if a parent is disabled and all its children are not, selecting all children will select the parent.

It is a controversial topic and I need more opinions before fixing this. Ideas so far:
1) Add a note to the docs page about this and leave it as it is
2) Cascade the disabled option too, so any disabled parent will automatically have its children disabled

Please share your thoughts,
Ivan

Roger Martin

unread,
Jul 7, 2014, 1:01:15 PM7/7/14
to jst...@googlegroups.com
I expect nodes that are disabled can never be checked/unchecked, whether from a user click or as part of a cascade.

As for whether to cascade the disabled option, I can imagine use cases where one would want a parent disabled but still allow the selection of children, so I would not support this change except when it is optional.

In the scenario where a parent is disabled and all the children are checked, I would expect the parent to remain unchecked.

Roger
Gallery Server Pro


--
You received this message because you are subscribed to the Google Groups "jsTree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jstree+un...@googlegroups.com.
To post to this group, send email to jst...@googlegroups.com.
Visit this group at http://groups.google.com/group/jstree.
For more options, visit https://groups.google.com/d/optout.

Ivan Bozhanov

unread,
Jul 7, 2014, 3:23:15 PM7/7/14
to jst...@googlegroups.com
Thank you for your input.
Btw - originally disabled is designed to block user interaction, but the developer can toggle the state. The idea is to be able to have a node that is always checked for example.
A disabled parent with not disabled children and a cascade option seems like a logical error to me anyway. So I will probably leave it alone as it does not make much sense (for example undetermined + disabled is crazy).
I will probably make sure to prevent checking disabled children, when cascade is on.
I will wait some more if someone else has an opinion about this.

Best regards and thanks once more,
Ivan



07 юли 2014, понеделник, 20:01:15 UTC+3, Roger Martin написа:
I expect nodes that are disabled can never be checked/unchecked, whether from a user click or as part of a cascade.

As for whether to cascade the disabled option, I can imagine use cases where one would want a parent disabled but still allow the selection of children, so I would not support this change except when it is optional.

In the scenario where a parent is disabled and all the children are checked, I would expect the parent to remain unchecked.

Roger
Gallery Server Pro
On Mon, Jul 7, 2014 at 4:51 AM, Ivan Bozhanov <ivan.b...@gmail.com> wrote:
Recently an issue came up with checkbox: https://github.com/vakata/jstree/issues/747

The problem is that if cascading is enabled then if a parent has a disabled node as a child, if you select the parent, the disabled node will be selected.
The same goes the other way around - if a parent is disabled and all its children are not, selecting all children will select the parent.

It is a controversial topic and I need more opinions before fixing this. Ideas so far:
1) Add a note to the docs page about this and leave it as it is
2) Cascade the disabled option too, so any disabled parent will automatically have its children disabled

Please share your thoughts,
Ivan

--
You received this message because you are subscribed to the Google Groups "jsTree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jstree+unsubscribe@googlegroups.com.

Bill McMilleon

unread,
Dec 16, 2014, 5:18:16 PM12/16/14
to jst...@googlegroups.com
I've hit this issue within an application I am working on and our team would definitely vote for the ability to prevent mutation of disabled checkboxes. I was surprised at the current behavior when I saw it.
To unsubscribe from this group and stop receiving emails from it, send an email to jstree+un...@googlegroups.com.

eduardoa...@gmail.com

unread,
Sep 7, 2017, 11:01:04 AM9/7/17
to jsTree
I see your point.. But I think that if you had a disable parent node it means that a node who come after (or below) that will be disable too. For example, if you had a box with 3 dogs inside and you decided not to choose that box you cannot take one dog and keep it with you because your first decision was not choose that box.
To unsubscribe from this group and stop receiving emails from it, send an email to jstree+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages