chore(react/collections/table): set up column dragging

This commit is contained in:
Elian Doran
2025-09-11 18:42:32 +03:00
parent ce0da3fb80
commit c30c9a7360
3 changed files with 131 additions and 34 deletions

View File

@@ -144,7 +144,10 @@ function useViewModeConfig<T extends object>(note: FNote | null | undefined, vie
if (!note || !viewType) return;
const viewStorage = new ViewModeStorage<T>(note, viewType);
viewStorage.restore().then(config => {
const storeFn = (config: T) => viewStorage.store(config);
const storeFn = (config: T) => {
setViewConfig([ config, storeFn ]);
viewStorage.store(config);
};
setViewConfig([ config, storeFn ]);
});
}, [ note, viewType ]);