I encountered a problem with the smart select,when I have a option with null value it won’t select that option,instead it will display an error on console.
I fixed the problem on my side but I’d like to suggest the solution I found and I didn’t knew where to do so.
I fixed it by changing this in smart-select-class.js(lane 119)
{
optionEl = ss.$selectEl.find(`option[value="${value}"]`)[0];
displayAs = optionEl.dataset ? optionEl.dataset.displayAs : $(optionEl).data('display-as');
text = displayAs && typeof displayAs !== 'undefined' ? displayAs : optionEl.textContent;
optionText = [text];
ss.selectEl.value = value;
}
with this
{
var elem=ss.$selectEl;
var optionEl2;
for(let i in elem[0].options){
if(elem[0].options[i].value==value){
optionEl2=elem[0].options[i];
}
}
displayAs = optionEl2.dataset ? optionEl2.dataset.displayAs : $(optionEl2).data('display-as');
text = displayAs && typeof displayAs !== 'undefined' ? displayAs : optionEl2.textContent;
optionText = [text];
ss.selectEl.value = value;
}
can this be included in the