-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Description
I have an input with optgroups and multiple turned on. I need to select an parent option (optgroup) using js. I tried to do:
$("#select2").select2("val", $("#select2").data("select2").opts.data[0]); // I got no reaction
$("#select2").select2("val", ["2","3","7"]); // pass all the child ids in array, but it selects all children optionsI googled a lot, but didnt found any useful suggestions. My select2 version is: 3.5
Metadata
Metadata
Assignees
Labels
No labels