JedWatson / JedWatson/react-select
Checked Disabled Option should not be removable
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Are you reporting a bug or runtime error?
Bug
https://codesandbox.io/p/sandbox/react-select-v5-sandbox-forked-fpmwhp
Disabled + checked option should not be uncheckable in any way.
(Same as a disabled option is not "checkable" in any way.)
Reproduction:
The CodeSandbox features a checked disabled option ("Red") which cannot be unselected by clicking on it.
It can however be "unchecked" by pressing backspace in the input.
It can also be "unchecked" by clicking the MultiValueRemove button.
It can also be "unchecked" by selecting it with the arrow keys on the keyboard and either pressing space or enter.
However the disabled option cannot be "checked" again after that using the described methods above.
Summary
A disabled option cannot be checked, so it a disabled+checked option IMHO should also not be uncheckable.
Many thanks in advance for looking into it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction and inspect the selection/removal behavior around the disabled checked option, including the MultiValueRemove control and keyboard interactions. Done means a disabled option that is already checked remains selected when backspace, removal, space, or enter would otherwise uncheck it, while the reported reproduction no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100