A responsive table library with built-in sorting, pagination, selection, expandable rows, and customizable styling.
2.04k
stars
411
forks
source link
conditionalCellStyles '&:hover' does not work in react typescript #1182
Open
mohammedmudassir687687 opened 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 } ]
`