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';
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.
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.
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.
Particular options can be prevented from selection using the optionDisabled property.
-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.
Name | -Type | -Default | -Description | -
---|---|---|---|
Name | +Type | +Default | +Description | +
value | -any | -null | -Value of the component. | -
options | -array | -null | -An array of objects to display as the available options. | -
optionLabel | -string | -null | -Name of the label field of an option when an arbitrary objects instead of SelectItems are used as options. | -
multiple | -boolean | -false | -When specified, allows selecting multiple values. | -
disabled | -boolean | -false | -When present, it specifies that the element should be disabled. | -
dataKey | -string | -null | -A property to uniquely match the value in options for better performance. | -
name | -string | -null | -??? | -
optionValue | -any | -null | -??? | -
optionDisabled | -boolean | -null | -??? | -
value | +any | +null | +Value of the component. | +
options | +array | +null | +An array of selectitems to display as the available options. | +
optionLabel | +string | +null | +Property name to use as the label of an option. | +
optionValue | +string | +null | +Property name to use as the value of an option, defaults to the option itself when not defined. | +
optionDisabled | +boolean | +null | +Property name to use as the disabled flag of an option, defaults to false when not defined. | +
multiple | +boolean | +false | +When specified, allows selecting multiple values. | +
disabled | +boolean | +false | +When present, it specifies that the element should be disabled. | +
dataKey | +string | +null | +A property to uniquely match the value in options for better performance. | +
Name | -Parameters | -Description | -
---|---|---|
Name | +Parameters | +Description | +
input | -event: Single value or an array of values that are selected. | -Callback to invoke on value change. | -
focus | -event: Browser event | -Callback to invoke on focus. | -
blur | -event: Browser event | -Callback to invoke on blur. | -
input | +event: Single value or an array of values that are selected. | +Callback to invoke on value change. | +
focus | +event: Browser event | +Callback to invoke on focus. | +
blur | +event: Browser event | +Callback to invoke on blur. | +