[bugfix]: use persistent columns def instead of default merge behavior

This commit is contained in:
Kendall Garner
2024-04-23 23:25:32 -07:00
parent 087ea44737
commit dc95a3c66b
5 changed files with 27 additions and 16 deletions
+2 -4
View File
@@ -1,10 +1,10 @@
import merge from 'lodash/merge';
import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
import { immer } from 'zustand/middleware/immer';
import { AlbumArtistListArgs, AlbumArtistListSort, SortOrder } from '/@/renderer/api/types';
import { DataTableProps } from '/@/renderer/store/settings.store';
import { ListDisplayType, TableColumn, TablePagination } from '/@/renderer/types';
import { mergeOverridingColumns } from '/@/renderer/store/utils';
type TableProps = {
pagination: TablePagination;
@@ -102,9 +102,7 @@ export const useAlbumArtistStore = create<AlbumArtistSlice>()(
{ name: 'store_album_artist' },
),
{
merge: (persistedState, currentState) => {
return merge(currentState, persistedState);
},
merge: mergeOverridingColumns,
name: 'store_album_artist',
version: 1,
},