From 4b2708e1e422d6f178377158e6cb5739e94d7ffa Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sun, 23 Nov 2025 00:46:57 -0800 Subject: [PATCH] fix activeRowId styles for title columns --- .../item-list/item-table-list/columns/row-index-column.tsx | 4 +++- .../item-list/item-table-list/columns/title-column.tsx | 4 +++- .../item-table-list/columns/title-combined-column.tsx | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/item-list/item-table-list/columns/row-index-column.tsx b/src/renderer/components/item-list/item-table-list/columns/row-index-column.tsx index f0094e736..b6d6aebbc 100644 --- a/src/renderer/components/item-list/item-table-list/columns/row-index-column.tsx +++ b/src/renderer/components/item-list/item-table-list/columns/row-index-column.tsx @@ -84,7 +84,9 @@ const DefaultRowIndexColumn = (props: ItemTableListInnerColumn) => { const QueueSongRowIndexColumn = (props: ItemTableListInnerColumn) => { const status = usePlayerStatus(); const song = props.data[props.rowIndex] as QueueSong; - const isActive = props.activeRowId === song?.id || props.activeRowId === song?._uniqueId; + const isActive = + !!props.activeRowId && + (props.activeRowId === song?.id || props.activeRowId === song?._uniqueId); let adjustedRowIndex = props.adjustedRowIndexMap?.get(props.rowIndex) ?? diff --git a/src/renderer/components/item-list/item-table-list/columns/title-column.tsx b/src/renderer/components/item-list/item-table-list/columns/title-column.tsx index a85f64e6a..1fd0113c0 100644 --- a/src/renderer/components/item-list/item-table-list/columns/title-column.tsx +++ b/src/renderer/components/item-list/item-table-list/columns/title-column.tsx @@ -74,7 +74,9 @@ function QueueSongTitleColumn(props: ItemTableListInnerColumn) { ]; const song = props.data[props.rowIndex] as QueueSong; - const isActive = props.activeRowId === song?.id || props.activeRowId === song?._uniqueId; + const isActive = + !!props.activeRowId && + (props.activeRowId === song?.id || props.activeRowId === song?._uniqueId); if (typeof row === 'string') { const path = getTitlePath(props.itemType, (props.data[props.rowIndex] as any).id as string); diff --git a/src/renderer/components/item-list/item-table-list/columns/title-combined-column.tsx b/src/renderer/components/item-list/item-table-list/columns/title-combined-column.tsx index b6df72fa5..cdf166f79 100644 --- a/src/renderer/components/item-list/item-table-list/columns/title-combined-column.tsx +++ b/src/renderer/components/item-list/item-table-list/columns/title-combined-column.tsx @@ -88,7 +88,9 @@ export const QueueSongTitleCombinedColumn = (props: ItemTableListInnerColumn) => const row: object | undefined = (props.data as (any | undefined)[])[props.rowIndex]; const song = props.data[props.rowIndex] as QueueSong; - const isActive = props.activeRowId === song?.id || props.activeRowId === song?._uniqueId; + const isActive = + !!props.activeRowId && + (props.activeRowId === song?.id || props.activeRowId === song?._uniqueId); const artists = useMemo(() => { if (row && 'artists' in row && Array.isArray(row.artists)) {