SelectButton updates

pull/5507/head
tugcekucukoglu 2024-03-26 15:44:29 +03:00
parent a0c3e47afd
commit 636c89e750
2 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,16 @@
<template> <template>
<div :class="cx('root')" role="group" :aria-labelledby="ariaLabelledby" v-bind="ptmi('root')"> <div :class="cx('root')" role="group" :aria-labelledby="ariaLabelledby" v-bind="ptmi('root')">
<template v-for="(option, index) of options" :key="getOptionRenderKey(option)"> <template v-for="(option, index) of options" :key="getOptionRenderKey(option)">
<ToggleButton :modelValue="isSelected(option)" :onLabel="getOptionLabel(option)" :offLabel="getOptionLabel(option)" :disabled="disabled" :invalid="invalid" @change="onOptionSelect($event, option, index)" :pt="ptm('button')"> <ToggleButton
:modelValue="isSelected(option)"
:onLabel="getOptionLabel(option)"
:offLabel="getOptionLabel(option)"
:disabled="disabled"
:invalid="invalid"
:unstyled="unstyled"
@change="onOptionSelect($event, option, index)"
:pt="ptm('button')"
>
<template v-if="$slots.option" #default> <template v-if="$slots.option" #default>
<slot name="option" :option="option" :index="index"> <slot name="option" :option="option" :index="index">
<span v-bind="ptm('button')['label']">{{ getOptionLabel(option) }}</span> <span v-bind="ptm('button')['label']">{{ getOptionLabel(option) }}</span>

View File

@ -295,7 +295,6 @@ export default {
'primevue/message': path.resolve(__dirname, './components/lib/message/Message.vue'), 'primevue/message': path.resolve(__dirname, './components/lib/message/Message.vue'),
'primevue/tree': path.resolve(__dirname, './components/lib/tree/Tree.vue'), 'primevue/tree': path.resolve(__dirname, './components/lib/tree/Tree.vue'),
'primevue/badge': path.resolve(__dirname, './components/lib/badge/Badge.vue'), 'primevue/badge': path.resolve(__dirname, './components/lib/badge/Badge.vue'),
'primevue/selectbutton': path.resolve(__dirname, './components/lib/selectbutton/SelectButton.vue'),
'primevue/togglebutton': path.resolve(__dirname, './components/lib/togglebutton/ToggleButton.vue'), 'primevue/togglebutton': path.resolve(__dirname, './components/lib/togglebutton/ToggleButton.vue'),
'primevue/listbox': path.resolve(__dirname, './components/lib/listbox/Listbox.vue'), 'primevue/listbox': path.resolve(__dirname, './components/lib/listbox/Listbox.vue'),
'primevue/confirmationeventbus': path.resolve(__dirname, './components/lib/confirmationeventbus/ConfirmationEventBus.js'), 'primevue/confirmationeventbus': path.resolve(__dirname, './components/lib/confirmationeventbus/ConfirmationEventBus.js'),