diff --git a/src/renderer/features/albums/components/album-detail-content.tsx b/src/renderer/features/albums/components/album-detail-content.tsx index 04ac7361..39d1ea07 100644 --- a/src/renderer/features/albums/components/album-detail-content.tsx +++ b/src/renderer/features/albums/components/album-detail-content.tsx @@ -216,7 +216,7 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP }); }; - const handleContextMenu = useHandleTableContextMenu(LibraryItem.SONG, SONG_CONTEXT_MENU_ITEMS); + const onCellContextMenu = useHandleTableContextMenu(LibraryItem.SONG, SONG_CONTEXT_MENU_ITEMS); const handleRowDoubleClick = (e: RowDoubleClickedEvent) => { if (!e.data || e.node.isFullWidthCell()) return; @@ -360,6 +360,9 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP suppressRowDrag autoFitColumns={tableConfig.autoFit} columnDefs={columnDefs} + context={{ + onCellContextMenu, + }} enableCellChangeFlash={false} fullWidthCellRenderer={FullWidthDiscCell} getRowHeight={getRowHeight} @@ -374,7 +377,7 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP rowClassRules={rowClassRules} rowData={songsRowData} rowSelection="multiple" - onCellContextMenu={handleContextMenu} + onCellContextMenu={onCellContextMenu} onRowDoubleClicked={handleRowDoubleClick} /> diff --git a/src/renderer/features/now-playing/components/play-queue.tsx b/src/renderer/features/now-playing/components/play-queue.tsx index d101588d..62253305 100644 --- a/src/renderer/features/now-playing/components/play-queue.tsx +++ b/src/renderer/features/now-playing/components/play-queue.tsx @@ -206,7 +206,7 @@ export const PlayQueue = forwardRef(({ type }: QueueProps, ref: Ref) => { } }, [currentSong, previousSong, tableConfig.followCurrentSong]); - const handleContextMenu = useHandleTableContextMenu(LibraryItem.SONG, QUEUE_CONTEXT_MENU_ITEMS); + const onCellContextMenu = useHandleTableContextMenu(LibraryItem.SONG, QUEUE_CONTEXT_MENU_ITEMS); return ( @@ -218,6 +218,9 @@ export const PlayQueue = forwardRef(({ type }: QueueProps, ref: Ref) => { rowDragMultiRow autoFitColumns={tableConfig.autoFit} columnDefs={columnDefs} + context={{ + onCellContextMenu, + }} deselectOnClickOutside={type === 'fullScreen'} getRowId={(data) => data.data.uniqueId} rowBuffer={50} @@ -225,7 +228,7 @@ export const PlayQueue = forwardRef(({ type }: QueueProps, ref: Ref) => { rowData={queue} rowHeight={tableConfig.rowHeight || 40} suppressCellFocus={type === 'fullScreen'} - onCellContextMenu={handleContextMenu} + onCellContextMenu={onCellContextMenu} onCellDoubleClicked={handleDoubleClick} onColumnMoved={handleColumnChange} onColumnResized={debouncedColumnChange}