mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Code refactor
This commit is contained in:
parent
84d3e7fd15
commit
973630e1f2
1 changed files with 4 additions and 1 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue