Fixed #1773 - Disabled not working for SelectButton

pull/1792/head
Tuğçe Küçükoğlu 2021-11-18 10:15:25 +03:00
parent b5a99ff9b1
commit a02160367c
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="p-selectbutton p-buttonset p-component" role="group">
<div :class="containerClass" role="group">
<div v-for="(option, i) of options" :key="getOptionRenderKey(option)" :aria-label="getOptionLabel(option)" role="button" :aria-pressed="isSelected(option)"
@click="onOptionSelect($event, option, i)" @keydown.enter.prevent="onOptionSelect($event, option, i)" @keydown.space.prevent="onOptionSelect($event, option)"
:tabindex="isOptionDisabled(option) ? null : '0'" @focus="onFocus($event)" @blur="onBlur($event)" :aria-labelledby="ariaLabelledBy" v-ripple
@ -98,6 +98,11 @@ export default {
}
},
computed: {
containerClass() {
return ['p-selectbutton p-buttonset p-component', {
'p-disabled': this.disabled
}];
},
equalityKey() {
return this.optionValue ? null : this.dataKey;
}