mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
add activeRowId styles to song list table
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user