Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group option isn't checked if all child options are checked initially #97

Open
Stiggi opened this issue Dec 2, 2022 · 1 comment
Open

Comments

@Stiggi
Copy link

Stiggi commented Dec 2, 2022

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

@Stiggi
Copy link
Author

Stiggi commented Dec 2, 2022

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant