From ffa0938a86d9f3c5113e44f18a7f358ec28be8ef Mon Sep 17 00:00:00 2001 From: Akash Agrawal Date: Tue, 2 Oct 2018 11:02:54 +0530 Subject: [PATCH] ask for confirmation before deleting event triggers (close #599) --- .../components/Services/EventTrigger/Settings/Settings.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/console/src/components/Services/EventTrigger/Settings/Settings.js b/console/src/components/Services/EventTrigger/Settings/Settings.js index 91bd46deae9..5d33492ba2e 100644 --- a/console/src/components/Services/EventTrigger/Settings/Settings.js +++ b/console/src/components/Services/EventTrigger/Settings/Settings.js @@ -20,8 +20,12 @@ class Settings extends Component { )[0]; triggerSchema = triggerSchema ? triggerSchema : {}; - const handleDeleteTrigger = () => { - dispatch(deleteTrigger(triggerName)); + const handleDeleteTrigger = e => { + e.preventDefault(); + const isOk = confirm('Are you sure?'); + if (isOk) { + dispatch(deleteTrigger(triggerName)); + } }; return (