fix: disable highlighting on non-expandable rows (#592)
This commit is contained in:
parent
1d8bab3206
commit
4a0072df40
@ -16,6 +16,8 @@ function getBorderColor(row: AccountBalanceRow) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function Row<T>(props: Props<T>) {
|
export default function Row<T>(props: Props<T>) {
|
||||||
|
const canExpand = !!props.renderExpanded
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<tr
|
<tr
|
||||||
@ -23,7 +25,7 @@ export default function Row<T>(props: Props<T>) {
|
|||||||
className={classNames(
|
className={classNames(
|
||||||
'group/row transition-bg',
|
'group/row transition-bg',
|
||||||
props.renderExpanded && 'hover:cursor-pointer',
|
props.renderExpanded && 'hover:cursor-pointer',
|
||||||
props.row.getIsExpanded() ? 'is-expanded bg-black/20' : 'hover:bg-white/5',
|
canExpand && props.row.getIsExpanded() ? 'is-expanded bg-black/20' : 'hover:bg-white/5',
|
||||||
)}
|
)}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
Loading…
Reference in New Issue
Block a user