reset field.name to originalName after cancel

This commit is contained in:
Maurits Lourens 2022-01-18 10:45:37 +01:00
parent 7335a6ab5e
commit 77d0a556bd
1 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,10 @@
}
}
function cancelEdit() {
field.name = originalName
}
function deleteColumn() {
if (field.name === $tables.selected.primaryDisplay) {
notifications.error("You cannot delete the display column")
@ -307,6 +311,7 @@
title={originalName ? "Edit Column" : "Create Column"}
confirmText="Save Column"
onConfirm={saveColumn}
onCancel={cancelEdit}
disabled={invalid}
>
<Input