Merge pull request #4082 from mslourens/cancel_rename_column

reset field.name to originalName after cancel
This commit is contained in:
Michael Drury 2022-01-18 15:29:39 +00:00 committed by GitHub
commit 8873cffb17
1 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,10 @@
} }
} }
function cancelEdit() {
field.name = originalName
}
function deleteColumn() { function deleteColumn() {
field.name = deleteColName field.name = deleteColName
if (field.name === $tables.selected.primaryDisplay) { if (field.name === $tables.selected.primaryDisplay) {
@ -308,6 +312,7 @@
title={originalName ? "Edit Column" : "Create Column"} title={originalName ? "Edit Column" : "Create Column"}
confirmText="Save Column" confirmText="Save Column"
onConfirm={saveColumn} onConfirm={saveColumn}
onCancel={cancelEdit}
disabled={invalid} disabled={invalid}
> >
<Input <Input