mirror of
https://github.com/chartdb/chartdb.git
synced 2025-11-14 02:45:44 +00:00
redo/undo fix
This commit is contained in:
committed by
Jonathan Fishner
parent
b66758c7ed
commit
b89a63553f
@@ -1,6 +1,6 @@
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import { DBTable } from '@/lib/domain/db-table';
|
||||
import { generateId } from '@/lib/utils';
|
||||
import { deepCopy, generateId } from '@/lib/utils';
|
||||
import { randomColor } from '@/lib/colors';
|
||||
import { ChartDBContext, chartDBContext } from './chartdb-context';
|
||||
import { DatabaseType } from '@/lib/domain/database-type';
|
||||
@@ -380,8 +380,7 @@ export const ChartDBProvider: React.FC<React.PropsWithChildren> = ({
|
||||
);
|
||||
};
|
||||
|
||||
const prevTables = [...tables];
|
||||
// const updatedTablesAttrs = updateFn(tables);
|
||||
const prevTables = deepCopy(tables);
|
||||
const updatedTables = updateTables(tables);
|
||||
setTables(updateTables);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user