From 4a0072df40734adba84f1e96b3a81b64292f31d6 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Fri, 27 Oct 2023 18:15:54 +0200 Subject: [PATCH] fix: disable highlighting on non-expandable rows (#592) --- src/components/Table/Row.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Table/Row.tsx b/src/components/Table/Row.tsx index 0138f9e4..b300db61 100644 --- a/src/components/Table/Row.tsx +++ b/src/components/Table/Row.tsx @@ -16,6 +16,8 @@ function getBorderColor(row: AccountBalanceRow) { } export default function Row(props: Props) { + const canExpand = !!props.renderExpanded + return ( <> (props: Props) { className={classNames( 'group/row transition-bg', 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) => { e.preventDefault()