We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce22bbc commit bb9d53fCopy full SHA for bb9d53f
1 file changed
src/index.ts
@@ -126,6 +126,9 @@ export default class Combobox {
126
el.removeAttribute('data-combobox-option-default')
127
128
if (target === el) {
129
+ if (!target.id) {
130
+ target.id = `combobox-item-${Math.random().toString().slice(2, 6)}`
131
+ }
132
this.input.setAttribute('aria-activedescendant', target.id)
133
target.setAttribute('aria-selected', 'true')
134
fireSelectEvent(target)
0 commit comments