Database diagrams editor that allows you to visualize and design your DB with a single query.
TypeScript databasedbdb-migrationeditorerdmariadbmssqlmysqlpostgresqlreactreact-flowschema-migrationssqlsqlitetypescriptvisualizationxyflow
fix(area): redo/undo after dragging an area with tables (#767)
Guy Ben-Aharon6af94afc56cf
diff --git a/src/pages/editor-page/canvas/canvas.tsx b/src/pages/editor-page/canvas/canvas.tsxindex 42024a63..7964431f 100644--- a/src/pages/editor-page/canvas/canvas.tsx+++ b/src/pages/editor-page/canvas/canvas.tsx@@ -440,19 +440,21 @@ export const Canvas: React.FC<CanvasProps> = ({ initialTables }) => {});if (needsUpdate.length > 0) {- updateTablesState((currentTables) =>- currentTables.map((table) => {- const update = needsUpdate.find(- (u) => u.id === table.id- );- if (update) {- return {- id: table.id,- parentAreaId: update.parentAreaId,- };- }- return table;- })+ updateTablesState(+ (currentTables) =>+ currentTables.map((table) => {+ const update = needsUpdate.find(+ (u) => u.id === table.id+ );+ if (update) {+ return {+ id: table.id,+ parentAreaId: update.parentAreaId,+ };+ }+ return table;+ }),+ { updateHistory: false });}}, 300);