add activeRowId styles to song list table

This commit is contained in:
jeffvli
2025-12-10 21:58:30 -08:00
parent 10aec7bcac
commit bea5bd7857
2 changed files with 8 additions and 0 deletions
@@ -9,6 +9,7 @@ import { ItemTableList } from '/@/renderer/components/item-list/item-table-list/
import { ItemTableListColumn } from '/@/renderer/components/item-list/item-table-list/item-table-list-column'; import { ItemTableListColumn } from '/@/renderer/components/item-list/item-table-list/item-table-list-column';
import { ItemListTableComponentProps } from '/@/renderer/components/item-list/types'; import { ItemListTableComponentProps } from '/@/renderer/components/item-list/types';
import { songsQueries } from '/@/renderer/features/songs/api/songs-api'; import { songsQueries } from '/@/renderer/features/songs/api/songs-api';
import { usePlayerSong } from '/@/renderer/store';
import { LibraryItem, SongListQuery, SongListSort, SortOrder } from '/@/shared/types/domain-types'; import { LibraryItem, SongListQuery, SongListSort, SortOrder } from '/@/shared/types/domain-types';
import { ItemListKey } from '/@/shared/types/types'; import { ItemListKey } from '/@/shared/types/types';
@@ -60,8 +61,11 @@ export const SongListInfiniteTable = ({
itemListKey: ItemListKey.SONG, itemListKey: ItemListKey.SONG,
}); });
const currentSong = usePlayerSong();
return ( return (
<ItemTableList <ItemTableList
activeRowId={currentSong?.id}
autoFitColumns={autoFitColumns} autoFitColumns={autoFitColumns}
CellComponent={ItemTableListColumn} CellComponent={ItemTableListColumn}
columns={columns} columns={columns}
@@ -11,6 +11,7 @@ import { ItemTableList } from '/@/renderer/components/item-list/item-table-list/
import { ItemTableListColumn } from '/@/renderer/components/item-list/item-table-list/item-table-list-column'; import { ItemTableListColumn } from '/@/renderer/components/item-list/item-table-list/item-table-list-column';
import { ItemListTableComponentProps } from '/@/renderer/components/item-list/types'; import { ItemListTableComponentProps } from '/@/renderer/components/item-list/types';
import { songsQueries } from '/@/renderer/features/songs/api/songs-api'; import { songsQueries } from '/@/renderer/features/songs/api/songs-api';
import { usePlayerSong } from '/@/renderer/store';
import { LibraryItem, SongListQuery, SongListSort, SortOrder } from '/@/shared/types/domain-types'; import { LibraryItem, SongListQuery, SongListSort, SortOrder } from '/@/shared/types/domain-types';
import { ItemListKey } from '/@/shared/types/types'; import { ItemListKey } from '/@/shared/types/types';
@@ -67,6 +68,8 @@ export const SongListPaginatedTable = ({
const startRowIndex = currentPage * itemsPerPage; const startRowIndex = currentPage * itemsPerPage;
const currentSong = usePlayerSong();
return ( return (
<ItemListWithPagination <ItemListWithPagination
currentPage={currentPage} currentPage={currentPage}
@@ -76,6 +79,7 @@ export const SongListPaginatedTable = ({
totalItemCount={totalItemCount} totalItemCount={totalItemCount}
> >
<ItemTableList <ItemTableList
activeRowId={currentSong?.id}
autoFitColumns={autoFitColumns} autoFitColumns={autoFitColumns}
CellComponent={ItemTableListColumn} CellComponent={ItemTableListColumn}
columns={columns} columns={columns}