mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
fix item playback buttons on search list (#885)
This commit is contained in:
parent
4a3604b1a8
commit
d35e73792f
2 changed files with 3 additions and 4 deletions
|
|
@ -76,8 +76,6 @@ export const useHandlePlayQueueAdd = () => {
|
||||||
let songs: QueueSong[] | null = null;
|
let songs: QueueSong[] | null = null;
|
||||||
let initialSongIndex = 0;
|
let initialSongIndex = 0;
|
||||||
|
|
||||||
console.log('options :>> ', options);
|
|
||||||
|
|
||||||
if (byItemType) {
|
if (byItemType) {
|
||||||
let songList: SongListResponse | undefined;
|
let songList: SongListResponse | undefined;
|
||||||
const { type: itemType, id } = byItemType;
|
const { type: itemType, id } = byItemType;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { MutableRefObject } from 'react';
|
||||||
import { generatePath, useNavigate } from 'react-router';
|
import { generatePath, useNavigate } from 'react-router';
|
||||||
import { useParams, useSearchParams } from 'react-router-dom';
|
import { useParams, useSearchParams } from 'react-router-dom';
|
||||||
import { AppRoute } from '../../../router/routes';
|
import { AppRoute } from '../../../router/routes';
|
||||||
import { LibraryItem, QueueSong } from '/@/renderer/api/types';
|
import { LibraryItem, QueueSong, SongListQuery } from '/@/renderer/api/types';
|
||||||
import { VirtualGridAutoSizerContainer } from '/@/renderer/components/virtual-grid';
|
import { VirtualGridAutoSizerContainer } from '/@/renderer/components/virtual-grid';
|
||||||
import { VirtualTable } from '/@/renderer/components/virtual-table';
|
import { VirtualTable } from '/@/renderer/components/virtual-table';
|
||||||
import { useCurrentSongRowStyles } from '/@/renderer/components/virtual-table/hooks/use-current-song-row-styles';
|
import { useCurrentSongRowStyles } from '/@/renderer/components/virtual-table/hooks/use-current-song-row-styles';
|
||||||
|
|
@ -80,7 +80,7 @@ export const SearchContent = ({ tableRef }: SearchContentProps) => {
|
||||||
|
|
||||||
const { rowClassRules } = useCurrentSongRowStyles({ tableRef });
|
const { rowClassRules } = useCurrentSongRowStyles({ tableRef });
|
||||||
|
|
||||||
const tableProps = useVirtualTable({
|
const tableProps = useVirtualTable<SongListQuery>({
|
||||||
contextMenu: contextMenuItems(),
|
contextMenu: contextMenuItems(),
|
||||||
customFilters: filter,
|
customFilters: filter,
|
||||||
itemType,
|
itemType,
|
||||||
|
|
@ -96,6 +96,7 @@ export const SearchContent = ({ tableRef }: SearchContentProps) => {
|
||||||
key={`table-${itemType}-${tableProps.rowHeight}-${server?.id}`}
|
key={`table-${itemType}-${tableProps.rowHeight}-${server?.id}`}
|
||||||
ref={tableRef}
|
ref={tableRef}
|
||||||
context={{
|
context={{
|
||||||
|
itemType,
|
||||||
query: searchParams.get('query'),
|
query: searchParams.get('query'),
|
||||||
}}
|
}}
|
||||||
getRowId={(data) => data.data.id}
|
getRowId={(data) => data.data.id}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue