-
Notifications
You must be signed in to change notification settings - Fork 376
Description
Describe the issue. What is the expected and unexpected behavior?
While the option is set as disabled, it's still possible to remove it from the list of selected items
Please provide the steps to reproduce. Feel free to link CodeSandbox or another tool.
- Open CodeSandbox for Multiple Select
- Set an option as disabled and add it in
selected:
this.state = {
options: [
{ value: 'Alabama', disabled: true },
{ value: 'Florida', disabled: false },
{ value: 'New Jersey', disabled: false },
{ value: 'New Mexico', disabled: false },
{ value: 'New York', disabled: false },
{ value: 'North Carolina', disabled: false }
],
isExpanded: false,
selected: ['Alabama'],
isCreatable: false,
hasOnCreateOption: false
};- Refresh CodeSandbox brower
Alabama option can not be added anymore from the list of option, but still can be removed from the selected list.
On Chip object itself, this is possible to set by isReadOnly attribute.
Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around?
Either bug or isReadOnly possibility is missing.
What is your product and what release version are you targeting?
ansible/ansible-hub-ui#94 (comment)
Comments
I've also tried to use isPlaceholder attribute. This did not help either.
