You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 4, 2024. It is now read-only.
Unfortunately the documentation isn't exactly detailed. I had to do this myself (to clear the selected value) and I had to read the source code to figure out what method to call.
On your SelectPure instance, call instance.setSelectValue(instance.options[INDEX]) where INDEX is the index of the option you want to be set.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Good afternoon. Cool plugin! But I can't figure out how to programmatically set the selected options. I'm using the vanilla version.
const myOptions = [ { label: "New York", value: "NY", }, { label: "Washington", value: "WA", }, { label: "California", value: "CA", }, { label: "New Jersey", value: "NJ", }, { label: "North Carolina", value: "NC", }, ]; var instance = new SelectPure(".multi_select", { options: myOptions, multiple: true, icon: "ms_close", });
instance.value(["NY"]) - not work
The text was updated successfully, but these errors were encountered: