ask for confirmation before deleting event triggers (close #599)

This commit is contained in:
Akash Agrawal 2018-10-02 11:02:54 +05:30 committed by Shahidh K Muhammed
parent 4643458cf9
commit ffa0938a86

View File

@ -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 (