Skip to content

Commit

Permalink
Fix import from sql when overwrite is off
Browse files Browse the repository at this point in the history
  • Loading branch information
1ilit committed Aug 2, 2024
1 parent 6f7b080 commit 32cf7c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/EditorHeader/Modal/Modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,12 @@ export default function Modal({
setUndoStack([]);
setRedoStack([]);
} else {
setTables((prev) => [...prev, ...d.tables]);
setRelationships((prev) => [...prev, ...d.relationships]);
setTables((prev) =>
[...prev, ...d.tables].map((t, i) => ({ ...t, id: i })),
);
setRelationships((prev) =>
[...prev, ...d.relationships].map((r, i) => ({ ...r, id: i })),
);
}
setModal(MODAL.NONE);
};
Expand Down

0 comments on commit 32cf7c6

Please sign in to comment.