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
When user check and uncheck item, in native select, option doesn't remove attribute selected=true.
You can fix it by:
varselect=this.el;select.querySelectorAll("option").forEach(function(item){item.removeAttribute("selected");});this.selectedOptions.forEach(function(item){varel=select.querySelector(`option[value="${item.data.value}"]`);if(el){//Change it, cause it works more correctly.el.setAttribute("selected","selected");el.selected=true;}});
Or some better solution with indexOf, filter.
The text was updated successfully, but these errors were encountered:
When user check and uncheck item, in native select, option doesn't remove attribute selected=true.
You can fix it by:
Or some better solution with indexOf, filter.
The text was updated successfully, but these errors were encountered: