✨(react) add disable property to select option
Based on recent feedbacks, this feature was needed for consumer apps. Resolve #60
This commit is contained in:
@@ -26,6 +26,7 @@ The available options must be given via the `options` props. It is an array of o
|
||||
code={`{
|
||||
label: string
|
||||
value?: string
|
||||
disabled?: boolean;
|
||||
}`}
|
||||
/>
|
||||
|
||||
@@ -83,6 +84,15 @@ By default, the select is clearable ( the cross icon on the right is shown ). Yo
|
||||
<Story id="components-forms-select-mono--not-clearable"/>
|
||||
</Canvas>
|
||||
|
||||
|
||||
## Disabled options
|
||||
|
||||
You can disable some options by using the `disabled` props on the `Option` object.
|
||||
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-select-mono--disabled-options"/>
|
||||
</Canvas>
|
||||
|
||||
## Controlled / Non Controlled
|
||||
|
||||
Like a native select, you can use the Select component in a controlled or non controlled way. You can see the example below
|
||||
|
||||
Reference in New Issue
Block a user