We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 641c031 commit c9b848eCopy full SHA for c9b848e
1 file changed
apps/sim/hooks/use-table-undo.ts
@@ -335,9 +335,11 @@ export function useTableUndo({
335
}
336
if (action.previousFrozenColumns !== null) {
337
const currentFrozen = getFrozenColumnsRef.current?.() ?? []
338
- const newFrozen = currentFrozen.filter((n) => n !== action.columnName)
339
- onFrozenColumnsChangeRef.current?.(newFrozen)
340
- metadata.frozenColumns = newFrozen
+ if (currentFrozen.includes(action.columnName)) {
+ const newFrozen = currentFrozen.filter((n) => n !== action.columnName)
+ onFrozenColumnsChangeRef.current?.(newFrozen)
341
+ metadata.frozenColumns = newFrozen
342
+ }
343
344
if (Object.keys(metadata).length > 0) {
345
updateMetadataMutation.mutate(metadata)
0 commit comments