fix: add proper disabled-state styling to Select component
What does this PR do?
Problem
- The Select component did not visually indicate its disabled state, causing inconsistency with TextField.
Solution
-
Applied proper disabled-state styling using state.isDisabled (the correct react-select API source of truth)
-
Added !cursor-not-allowed to visually signal that the component is non-interactive.
-
Added !pointer-events-none to prevent any interaction when the component is disabled.
-
Fixes #25708
-
Fixes CAL-6883
Visual Demo
before:
https://github.com/user-attachments/assets/07b6e8ba-2c74-4112-94e6-93ae1dfbccfa
after:
https://github.com/user-attachments/assets/7b56ae66-7f69-48d0-89eb-cc1e3de8967a
Mandatory Tasks (DO NOT REMOVE)
- [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [x] I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A
- [x] I confirm automated tests are in place that prove my fix is effective or that my feature works.
How should this be tested?
Use any UI component that renders a SelectField with isDisabled={true}.
Expected behavior:
- Hovering should show
cursor-not-allowed. - Component should not respond to pointer events.
- Confirm behavior across themes (light/dark) and states (focus, hover).
- Verify that
react-select's internalstate.isDisabledis correctly reflected in the rendered component.
@eeshm is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
thanks for the feedback! made changes
- Created and linked the issue describing the missing disabled cursor/icon behavior.
- Added
hover:border-subtleto match the disabled TextField UI and ensure consistent visual behavior. pointer-events-autois needed because React-Select’s defaultpointer-events:nonehides the browser’s native red invalid icon. Restoring pointer events brings back the validation UI without re-enabling interaction, since React-Select already blocks interaction through other internal mechanisms.
https://github.com/user-attachments/assets/3b3db8b9-d8ef-47c8-9343-8d62a7394e54
Please let me know if you'd like any further adjustments!