Skip to content

Commit

Permalink
Fixed #1773 - Disabled not working for SelectButton
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Nov 18, 2021
1 parent b5a99ff commit a021603
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/selectbutton/SelectButton.vue
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a021603

Please sign in to comment.