1
0
Fork 0
mirror of synced 2024-07-01 20:41:03 +12:00

Merge pull request #4079 from mslourens/delete_renamed_column

use deleteColName when deleting a column
This commit is contained in:
Martin McKeaveney 2022-01-18 10:39:13 +01:00 committed by GitHub
commit b5d2396859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,7 @@
} }
function deleteColumn() { function deleteColumn() {
field.name = deleteColName
if (field.name === $tables.selected.primaryDisplay) { if (field.name === $tables.selected.primaryDisplay) {
notifications.error("You cannot delete the display column") notifications.error("You cannot delete the display column")
} else { } else {
@ -470,16 +471,16 @@
onOk={deleteColumn} onOk={deleteColumn}
onCancel={hideDeleteDialog} onCancel={hideDeleteDialog}
title="Confirm Deletion" title="Confirm Deletion"
disabled={deleteColName !== field.name} disabled={deleteColName !== originalName}
> >
<p> <p>
Are you sure you wish to delete the column <b>{field.name}?</b> Are you sure you wish to delete the column <b>{originalName}?</b>
Your data will be deleted and this action cannot be undone - enter the column Your data will be deleted and this action cannot be undone - enter the column
name to confirm. name to confirm.
</p> </p>
<Input <Input
dataCy="delete-column-confirm" dataCy="delete-column-confirm"
bind:value={deleteColName} bind:value={deleteColName}
placeholder={field.name} placeholder={originalName}
/> />
</ConfirmDialog> </ConfirmDialog>