diff --git a/src/renderer/components/virtual-table/table-pagination.tsx b/src/renderer/components/virtual-table/table-pagination.tsx index 014f1258..ed49c086 100644 --- a/src/renderer/components/virtual-table/table-pagination.tsx +++ b/src/renderer/components/virtual-table/table-pagination.tsx @@ -27,6 +27,7 @@ export const TablePagination = ({ tableRef, pagination, setPagination, + setIdPagination, }: TablePaginationProps) => { const [isGoToPageOpen, handlers] = useDisclosure(false); const containerQuery = useContainerQuery(); @@ -41,6 +42,7 @@ export const TablePagination = ({ const newPage = index - 1; tableRef.current?.api.paginationGoToPage(newPage); setPagination?.({ data: { currentPage: newPage }, key: pageKey }); + setIdPagination?.(pageKey || '', { currentPage: newPage }); }; const handleGoSubmit = goToForm.onSubmit((values) => { @@ -52,6 +54,7 @@ export const TablePagination = ({ const newPage = values.pageNumber - 1; tableRef.current?.api.paginationGoToPage(newPage); setPagination?.({ data: { currentPage: newPage }, key: pageKey }); + setIdPagination?.(pageKey || '', { currentPage: newPage }); }); const currentPageStartIndex = pagination.currentPage * pagination.itemsPerPage + 1; diff --git a/src/renderer/features/playlists/components/playlist-detail-song-list-content.tsx b/src/renderer/features/playlists/components/playlist-detail-song-list-content.tsx index 3d79bb6c..8f5c03f6 100644 --- a/src/renderer/features/playlists/components/playlist-detail-song-list-content.tsx +++ b/src/renderer/features/playlists/components/playlist-detail-song-list-content.tsx @@ -252,7 +252,7 @@ export const PlaylistDetailSongListContent = ({ tableRef }: PlaylistDetailConten > {page.display === ListDisplayType.TABLE_PAGINATED && ( { export type AlbumListFilter = Omit; export type SongListFilter = Omit; export type AlbumArtistListFilter = Omit; -export type PlaylistListFilter = Omit; export type ListKey = keyof ListState['item'] | string; -type FilterType = AlbumListFilter | SongListFilter | AlbumArtistListFilter | PlaylistListFilter; +type FilterType = AlbumListFilter | SongListFilter | AlbumArtistListFilter; type ListTableProps = { pagination: TablePagination; @@ -55,7 +53,6 @@ export interface ListState { album: ItemProps; albumArtist: ItemProps; albumDetail: ItemProps; - playlist: ItemProps; song: ItemProps; }; } diff --git a/src/renderer/store/playlist.store.ts b/src/renderer/store/playlist.store.ts index e9dc99a7..00dbf9fb 100644 --- a/src/renderer/store/playlist.store.ts +++ b/src/renderer/store/playlist.store.ts @@ -3,8 +3,8 @@ import create from 'zustand'; import { devtools, persist } from 'zustand/middleware'; import { immer } from 'zustand/middleware/immer'; import { PlaylistListArgs, PlaylistListSort, SortOrder } from '/@/renderer/api/types'; +import { SongListFilter } from '/@/renderer/store/list.store'; import { DataTableProps } from '/@/renderer/store/settings.store'; -import { SongListFilter } from '/@/renderer/store/song.store'; import { ListDisplayType, TableColumn, TablePagination } from '/@/renderer/types'; type TableProps = {