Skip to content

Commit f4802e9

Browse files
authored
fix: unable save edit column after discard change (#421)
1 parent 5a2de66 commit f4802e9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/gui/tabs/schema-editor-tab.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ interface SchemaEditorTabProps {
1414
}
1515

1616
const EMPTY_SCHEMA: DatabaseTableSchemaChange = {
17-
name: {
18-
old: "",
19-
new: "",
20-
},
17+
name: { old: "", new: "" },
2118
columns: [],
2219
constraints: [],
2320
createScript: "",
@@ -66,6 +63,7 @@ export default function SchemaEditorTab({
6663
const onDiscard = useCallback(() => {
6764
setSchema((prev) => {
6865
return {
66+
schemaName: prev.schemaName,
6967
name: { ...prev.name, new: prev.name.old },
7068
columns: prev.columns
7169
.map((col) => ({

0 commit comments

Comments
 (0)