Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/primefaces/primevue
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed May 30, 2019
2 parents b75b748 + 1d011e7 commit 37ddaba
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/selectbutton/SelectButton.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="p-selectbutton p-buttonset p-component p-buttonset">
<div v-for="(option, i) of options" :key="getOptionLabel(option)" :aria-label="getOptionLabel(option)"
<div :class="containerClass">
<div v-for="(option, i) of options" :key="getOptionLabel(option)" :aria-label="getOptionLabel(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, i)" @blur="onBlur($event)"
:class="['p-button p-component p-button-text-only', {'p-highlight': isSelected(option), 'p-disabled': isOptionDisabled(option), 'p-focus': (i === focusedIndex)}]">
Expand Down Expand Up @@ -89,6 +89,11 @@ export default {
this.focusedIndex = null
this.$emit('blur', event);
}
}
},
computed: {
containerClass() {
return 'p-selectbutton p-buttonset p-component p-buttonset-' + String(this.options ? this.options.length : 0);
}
},
}
</script>

0 comments on commit 37ddaba

Please sign in to comment.