JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.44k stars 4.1k forks source link

Cannot change cursor when using unstyled #5803

Open Worble opened 8 months ago

Worble commented 8 months ago

First of all, thanks for the library!

When using the unstyled option with classnames, it's not possible to change the mouse pointer due to specificity issues.

Code sandbox: https://codesandbox.io/s/react-select-v5-sandbox-forked-n63kht?file=/example.js

cssinate commented 6 months ago
  1. I agree that part of the "proper" solution is to ensure that user-defined classNames come last in the list
  2. A very easy workaround is to increase your specificity. Either div.cursor-not-allowed or .cursor-not-allowed.cursor-not-allowed would work in this case
  3. You'll notice that even if you do 2., the problem isn't solved since the wrapper has pointer-events: none on it, no cursor property on the element inside would ever work anyway.