mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 20:40:21 +02:00
add configuration to revert to single-select ItemGrid behavior
This commit is contained in:
@@ -7,6 +7,7 @@ import { useItemListScrollPersist } from '/@/renderer/components/item-list/helpe
|
||||
import { ItemGridList } from '/@/renderer/components/item-list/item-grid-list/item-grid-list';
|
||||
import { ItemListGridComponentProps } from '/@/renderer/components/item-list/types';
|
||||
import { songsQueries } from '/@/renderer/features/songs/api/songs-api';
|
||||
import { useGeneralSettings } from '/@/renderer/store';
|
||||
import { LibraryItem, SongListQuery, SongListSort, SortOrder } from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
@@ -47,11 +48,13 @@ export const SongListInfiniteGrid = ({
|
||||
});
|
||||
|
||||
const rows = useGridRows(LibraryItem.SONG, ItemListKey.SONG, size);
|
||||
const { enableGridMultiSelect } = useGeneralSettings();
|
||||
|
||||
return (
|
||||
<ItemGridList
|
||||
data={loadedItems}
|
||||
dataVersion={dataVersion}
|
||||
enableMultiSelect={enableGridMultiSelect}
|
||||
gap={gap}
|
||||
getItem={getItem}
|
||||
getItemIndex={getItemIndex}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { ItemListWithPagination } from '/@/renderer/components/item-list/item-li
|
||||
import { useItemListPagination } from '/@/renderer/components/item-list/item-list-pagination/use-item-list-pagination';
|
||||
import { ItemListGridComponentProps } from '/@/renderer/components/item-list/types';
|
||||
import { songsQueries } from '/@/renderer/features/songs/api/songs-api';
|
||||
import { useGeneralSettings } from '/@/renderer/store';
|
||||
import { LibraryItem, SongListQuery, SongListSort, SortOrder } from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
@@ -45,6 +46,7 @@ export const SongListPaginatedGrid = ({
|
||||
});
|
||||
|
||||
const rows = useGridRows(LibraryItem.SONG, ItemListKey.SONG, size);
|
||||
const { enableGridMultiSelect } = useGeneralSettings();
|
||||
|
||||
return (
|
||||
<ItemListWithPagination
|
||||
@@ -57,6 +59,7 @@ export const SongListPaginatedGrid = ({
|
||||
<ItemGridList
|
||||
currentPage={currentPage}
|
||||
data={data || []}
|
||||
enableMultiSelect={enableGridMultiSelect}
|
||||
gap={gap}
|
||||
itemsPerRow={itemsPerRow}
|
||||
itemType={LibraryItem.SONG}
|
||||
|
||||
Reference in New Issue
Block a user