vanillaSelectBox
vanillaSelectBox copied to clipboard
Set value for single SelectBox
Hello! I'm using this wonderful selectbox at the moment and it seems that I cannot set value for single selectbox.
I've tried with "multiple" type select box and it works as it should.
I've looked a bit inside this function and I'm not sure but perhaps in line 1296 the condition is meant to be just - if (liVal)
?
Line above this variable is let liVal = x.getAttribute("data-value") == values;
Sorry if I'm misleading, good day!
Around line number 1310: Change this let liVal = x.getAttribute("data-value") == values; To let liVal = x.getAttribute("data-value"); It will then work