vanillaSelectBox
vanillaSelectBox copied to clipboard
Group option isn't checked if all child options are checked initially
Hi,
I have several grouped options. It works fine, if I select them manually.
If the child options are checked initally, then the group option isn't checked.
See this fiddle: https://jsfiddle.net/stiggi/8co2buya/
Best regards Michael
workaround it with the following
let parentElements = this.drop.querySelectorAll("li.grouped-option");
if(parentElements){
Array.prototype.slice.call(parentElements).forEach(function (x) {
self.checkUncheckFromChild(x.nextSibling);
});
}
before line 1288
self.title.textContent = selectedTexts;
self.privateSendChange();