Reset app name in deletion confirmation modal when closing modal

This commit is contained in:
Andrew Kingston 2021-11-16 10:52:43 +00:00
parent 3ffa27969d
commit bb02491f41
1 changed files with 2 additions and 0 deletions

View File

@ -165,6 +165,7 @@
notifications.error(`Error deleting app: ${err}`) notifications.error(`Error deleting app: ${err}`)
} }
selectedApp = null selectedApp = null
appName = null
} }
const updateApp = async app => { const updateApp = async app => {
@ -298,6 +299,7 @@
title="Confirm deletion" title="Confirm deletion"
okText="Delete app" okText="Delete app"
onOk={confirmDeleteApp} onOk={confirmDeleteApp}
onCancel={() => (appName = null)}
disabled={appName !== selectedApp?.name} disabled={appName !== selectedApp?.name}
> >
Are you sure you want to delete the app <b>{selectedApp?.name}</b>? Are you sure you want to delete the app <b>{selectedApp?.name}</b>?