Code refactor

pull/5282/head
tugcekucukoglu 2024-02-14 12:29:39 +03:00
parent 84d3e7fd15
commit 973630e1f2
1 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,7 @@
v-for="(option, i) of options"
:key="getOptionRenderKey(option)"
v-ripple
:tabindex="disabled || isOptionDisabled(option) || i !== focusedIndex ? '-1' : '0'"
:tabindex="findTabindex(option, i)"
:aria-label="getOptionLabel(option)"
:role="multiple ? 'checkbox' : 'radio'"
:aria-checked="isSelected(option)"
@ -198,6 +198,9 @@ export default {
}
this.$emit('blur', event, option);
},
findTabindex(option, index) {
return this.disabled || this.isOptionDisabled(option) || index !== this.focusedIndex ? '-1' : '0';
}
},
computed: {