diff --git a/src/components/selectbutton/SelectButton.vue b/src/components/selectbutton/SelectButton.vue index 37cecac69..48e3d31e2 100644 --- a/src/components/selectbutton/SelectButton.vue +++ b/src/components/selectbutton/SelectButton.vue @@ -18,13 +18,12 @@ export default { props: { value: null, options: Array, - optionLabel: null, + optionLabel: null, + optionValue: null, + optionDisabled: null, multiple: Boolean, disabled: Boolean, - dataKey: null, - name: String, - optionValue: null, - optionDisabled: null + dataKey: null }, data() { return { diff --git a/src/views/dropdown/DropdownDoc.vue b/src/views/dropdown/DropdownDoc.vue index ff93acfe1..89c65486c 100644 --- a/src/views/dropdown/DropdownDoc.vue +++ b/src/views/dropdown/DropdownDoc.vue @@ -8,7 +8,7 @@ import Dropdown from 'primevue/dropdown';

Getting Started

-

Dropdown requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the field name of the option.

+

Dropdown requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.

<Dropdown v-model="selectedCity" :options="cities" optionLabel="name" placeholder="Select a City" /> diff --git a/src/views/multiselect/MultiSelectDoc.vue b/src/views/multiselect/MultiSelectDoc.vue index 60a4ddfc9..57c3ed4f2 100644 --- a/src/views/multiselect/MultiSelectDoc.vue +++ b/src/views/multiselect/MultiSelectDoc.vue @@ -8,7 +8,7 @@ import MultiSelect from 'primevue/multiselect';

Getting Started

-

MultiSelect requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the field name of the option.

+

MultiSelect requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.

<MultiSelect v-model="selectedCars" :options="cars" optionLabel="brand" placeholder="Select Brands" /> diff --git a/src/views/selectbutton/SelectButtonDoc.vue b/src/views/selectbutton/SelectButtonDoc.vue index c7dc87113..911d27794 100644 --- a/src/views/selectbutton/SelectButtonDoc.vue +++ b/src/views/selectbutton/SelectButtonDoc.vue @@ -8,7 +8,7 @@ import SelectButton from 'primevue/selectbutton';

Getting Started

-

SelectButton requires a value to bind, optionLabel and a collection of options. How to define the options property; Providing an array of arbitrary objects along with the optionLabel property to specify the field name of the option.

+

SelectButton requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.

<SelectButton v-model="selectedCity" :options="cities" optionLabel="name" /> @@ -34,11 +34,8 @@ export default { <SelectButton v-model="selectedCity" :options="cities" optionLabel="brand" :multiple="true" /> -

Disabled Options

-

Particular options can be prevented from selection using the optionDisabled property.

-

Templating

-

Items support templating to display custom content inside the buttons using an template that receives the option as the implicit variable.

+

Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter.