jbetancur / react-data-table-component

A responsive table library with built-in sorting, pagination, selection, expandable rows, and customizable styling.
https://react-data-table-component.netlify.app
Apache License 2.0
2.04k stars 411 forks source link

conditionalCellStyles '&:hover' does not work in react typescript #1182

Open mohammedmudassir687687 opened 10 months ago

mohammedmudassir687687 commented 10 months ago

Version

using react-data-table-component@7.5.4

Bug

styles applied to '&:hover' does not work within conditionalCellStyles for columns

Code to reproduce the behavior in react typescript

` interface IRow { title: string, } const columns = [ { name: 'Title', selector: (row: IRow) => row.title, conditionalCellStyles : [ { when: (row: IRow) => row.title.length < 5, style: { backgroundColor: 'green', color: 'white', '&:hover': { backgroundColor: 'blue' } }, }, ] }, ]

const data = [ { title: 'Amelie', year: '2001', rating: 8.3 }, { title: 'Hamilton', year: '2020', rating: 7.7 } ]

`

jewbetcha commented 8 months ago

+1 also seeing this