Fix field type not updating when Type name is changed (#193 part1)

This commit is contained in:
1ilit
2024-07-31 14:50:06 +03:00
parent 1a2ac74424
commit 52248f1016
2 changed files with 35 additions and 2 deletions

View File

@@ -298,6 +298,13 @@ export default function ControlPanel({
);
} else if (a.component === "self") {
updateType(a.tid, a.undo);
if (a.updatedFields) {
if (a.undo.name) {
a.updatedFields.forEach((x) =>
updateField(x.tid, x.fid, { type: a.undo.name.toUpperCase() }),
);
}
}
}
} else if (a.element === ObjectType.ENUM) {
updateEnum(a.id, a.undo);
@@ -460,6 +467,13 @@ export default function ControlPanel({
});
} else if (a.component === "self") {
updateType(a.tid, a.redo);
if (a.updatedFields) {
if (a.redo.name) {
a.updatedFields.forEach((x) =>
updateField(x.tid, x.fid, { type: a.redo.name.toUpperCase() }),
);
}
}
}
} else if (a.element === ObjectType.ENUM) {
updateEnum(a.id, a.redo);