react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

ConditionalStyles does not work with pseudo-classes (&:hover...)

Open GuYounes opened this issue 3 years ago • 0 comments

Issue Check list

  • [X] Agree to the Code of Conduct
  • [X] Read the README
  • [X] You are using React 16.8.0+
  • [X] You installed styled-components
  • [X] Include relevant code or preferably a code sandbox

Describe the bug

'&:hover' selector does not work with conditionalCellStyles with versions post 7.0.0-alpha-6 but works before (7.0.0-alpha-5 and below)

To Reproduce

Steps to reproduce the behavior:

  1. Go to codesandbox
  2. Hover the rows
  3. The hovered row background color should change to red
  4. Nothing happen

You can easily change the library version to 7.0.0-alpha-5 and see that it works

Expected behavior

The row background color should change to red

Code Sandbox, Screenshots, or Relevant Code

https://codesandbox.io/s/loving-carlos-ph76ev?file=/src/App.tsx

Versions (please complete the following information)

  • React 18.0.0
  • Styled Components 5.3.5
  • OS: Ubuntu 22.04
  • Browser Chrome 103.0.5060.134

Additional context

Add any other context about the problem here.

GuYounes avatar Aug 03 '22 09:08 GuYounes