We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 069c821 + 8a5fd3d commit 5b98f81Copy full SHA for 5b98f81
src/plugins/combobox/index.ts
@@ -618,8 +618,14 @@ class HSComboBox extends HSBasePlugin<IComboBoxOptions> implements IComboBox {
618
el.getAttribute("data-hs-combo-box-output-item-attr"),
619
);
620
621
- attributes.forEach((attr: IComboBoxItemAttr) => {
622
- el.setAttribute(attr.attr, item[attr.valueFrom]);
+ attributes.forEach((attr: IComboBoxItemAttr) => {
+ let value: string = item[attr.valueFrom]
623
+
624
+ if (attr.attr === 'class' && el.className) {
625
+ el.className = `${el.className} ${value}`.trim()
626
+ } else {
627
+ el.setAttribute(attr.attr, value)
628
+ }
629
});
630
631
newItem.setAttribute("tabIndex", `${index}`);
0 commit comments