For example i have 2 records pre-selected as seen in screenshot below.
I noticed that aria-selected="true" for selected ones.
How can I find it by title and remove/reset it so it will not be part of current selected items.
Thanks in advance.
For example i have 2 records pre-selected as seen in screenshot below.
I noticed that aria-selected="true" for selected ones.
How can I find it by title and remove/reset it so it will not be part of current selected items.
Thanks in advance.
Copyright © 2021 Jogjafile Inc.

select2has link to particular<select>element in DOM. So, first you need to change select option, and then triggerchangeevent ofselect2For change
optiontext you can like thisAnd then trigger
changeevent forselect2:Remove item
Select one option
Select multiple options
Remove one from selected
If you need remove one option from already selected, you need to get selected options, remove one, and set new options to select2.