mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-03 05:37:56 +01:00
docs(Select): disable single select options (#422)
This commit is contained in:
@@ -29,6 +29,8 @@ const country = ref(countries[0])
|
|||||||
|
|
||||||
When using objects, you can configure which field will be used for display through the `option-attribute` prop that defaults to `label` and which field will be used for comparison through the `value-attribute` prop that defaults to `value`.
|
When using objects, you can configure which field will be used for display through the `option-attribute` prop that defaults to `label` and which field will be used for comparison through the `value-attribute` prop that defaults to `value`.
|
||||||
|
|
||||||
|
Adding a `disabled` key to the objects will control the disabled state of the option.
|
||||||
|
|
||||||
::component-example
|
::component-example
|
||||||
#default
|
#default
|
||||||
:select-example-objects
|
:select-example-objects
|
||||||
@@ -41,7 +43,8 @@ const countries = [{
|
|||||||
value: 'US'
|
value: 'US'
|
||||||
}, {
|
}, {
|
||||||
name: 'Canada',
|
name: 'Canada',
|
||||||
value: 'CA'
|
value: 'CA',
|
||||||
|
disabled: true
|
||||||
}, {
|
}, {
|
||||||
name: 'Mexico',
|
name: 'Mexico',
|
||||||
value: 'MX'
|
value: 'MX'
|
||||||
@@ -191,6 +194,8 @@ props:
|
|||||||
---
|
---
|
||||||
::
|
::
|
||||||
|
|
||||||
|
Add a `disabled` key with a truthy value to the `options` array of object to disable a single option.
|
||||||
|
|
||||||
### Loading
|
### Loading
|
||||||
|
|
||||||
Use the `loading` prop to show a loading icon and disable the Input.
|
Use the `loading` prop to show a loading icon and disable the Input.
|
||||||
|
|||||||
Reference in New Issue
Block a user