mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Fix current song row when queue is empty
This commit is contained in:
@@ -40,6 +40,7 @@ export const useCurrentSongRowStyles = ({ tableRef }: UseCurrentSongRowStylesPro
|
||||
return {
|
||||
'current-song': (params) => {
|
||||
return (
|
||||
currentSong?.id !== undefined &&
|
||||
params?.data?.id === currentSong?.id &&
|
||||
params?.data?.albumId === currentSong?.albumId
|
||||
);
|
||||
|
||||
@@ -280,10 +280,14 @@ const tableColumns: { [key: string]: ColDef } = {
|
||||
cellClass: 'row-index',
|
||||
cellClassRules: {
|
||||
'current-playlist-song-cell': (params) => {
|
||||
return params.data?.uniqueId === params.context?.currentSong?.uniqueId;
|
||||
return (
|
||||
params.context?.currentSong?.uniqueId !== undefined &&
|
||||
params.data?.uniqueId === params.context?.currentSong?.uniqueId
|
||||
);
|
||||
},
|
||||
'current-song-cell': (params) => {
|
||||
return (
|
||||
params.context?.currentSong?.id !== undefined &&
|
||||
params.data?.id === params.context?.currentSong?.id &&
|
||||
params.data?.albumId === params.context?.currentSong?.albumId
|
||||
);
|
||||
@@ -363,6 +367,7 @@ const tableColumns: { [key: string]: ColDef } = {
|
||||
cellClassRules: {
|
||||
'current-song-cell': (params) => {
|
||||
return (
|
||||
params.context?.currentSong?.id !== undefined &&
|
||||
params.data?.id === params.context?.currentSong?.id &&
|
||||
params.data?.albumId === params.context?.currentSong?.albumId
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user