When selected parent element, disabled child nodes are also getting selected
i have below structrue var myData = [{ "id": '1', "pid": '', "name": "Root", "disabled": true }, { "id": '1.1', "pid": '1', // parent ID "name": "Level 1" }, { "id": '1.1.1', "pid": '1.1', // parent ID "name": "Level 2", "disabled": true }, { "id": '1.1.1.1', "pid": '1.1', // parent ID "name": "Level 2" }];
In the above structure, Level 1 can be selectable and Level 2 with id 1.1.1.1 is selectable.
If directly parent node is selected, i.e 1.1, even 1.1.1 obj is getting selected, but it should not as its disabled.
On the doCheck method of simTree.js file, i have added the below line of code.
@line no 351. if ($li.hasClass('disabled')) return;
This works for me, please review.
I don't think its a proper fix, it worked initially. But when we have intermediate parents as disabled, but childs are enabled, selection doesn't work properly.