Summary
https://preline.co/docs/components/advanced-select.html
Steps to Reproduce
const selectEl = document.getElementById('advanced-select');
const hs = new HSSelect(selectEl);
hs.addOption([
{
title: 'John',
val: '1'
},
{
title: 'Steve',
val: '2'
},
{
title: 'Bob',
val: '3'
},
]);
When viewing the source, the options look like:
<option value="1" data-hs-select-option="undefined">John</option>
<option value="2" data-hs-select-option="undefined">Steve</option>
<option value="3" data-hs-select-option="undefined">Bob</option>
Demo Link
https://preline.co/docs/components/advanced-select.html
Expected Behavior
If no options object is passed, omit setting the data-hs-select-option attribute altogether.
Actual Behavior
The data-hs-select-option attribute is set on each option whether it exists or not.
Screenshots
No response
Summary
https://preline.co/docs/components/advanced-select.html
Steps to Reproduce
When viewing the source, the options look like:
Demo Link
https://preline.co/docs/components/advanced-select.html
Expected Behavior
If no
optionsobject is passed, omit setting thedata-hs-select-optionattribute altogether.Actual Behavior
The
data-hs-select-optionattribute is set on each option whether it exists or not.Screenshots
No response