[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
@@ -2,7 +2,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { ColDef } from '@ag-grid-community/core';
import isElectron from 'is-electron';
import merge from 'lodash/merge';
import { generatePath } from 'react-router';
import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
@@ -24,6 +23,7 @@ import {
import { randomString } from '/@/renderer/utils';
import i18n from '/@/i18n/i18n';
import { usePlayerStore } from '/@/renderer/store/player.store';
import { mergeOverridingColumns } from '/@/renderer/store/utils';
const utils = isElectron() ? window.electron.utils : null;
@@ -640,9 +640,7 @@ export const useSettingsStore = create<SettingsSlice>()(
{ name: 'store_settings' },
),
{
merge: (persistedState, currentState) => {
return merge(currentState, persistedState);
},
merge: mergeOverridingColumns,
name: 'store_settings',
version: 8,
},