vanillaSelectBox icon indicating copy to clipboard operation
vanillaSelectBox copied to clipboard

Set value for single SelectBox

Open DeVibes opened this issue 2 years ago • 1 comments

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!

DeVibes avatar Sep 08 '22 09:09 DeVibes

Around line number 1310: Change this let liVal = x.getAttribute("data-value") == values; To let liVal = x.getAttribute("data-value"); It will then work

shanxp avatar Sep 19 '22 16:09 shanxp