From 2feed3093b053e746a4d5149b008901f6a62bce1 Mon Sep 17 00:00:00 2001 From: "damian.przygodzki" Date: Mon, 10 Apr 2017 12:16:05 +0200 Subject: [PATCH] #619 Window confirmation for all of attribute widgets --- src/components/widget/Attributes/Attributes.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/widget/Attributes/Attributes.js b/src/components/widget/Attributes/Attributes.js index 30d074d0f..d7b68904f 100644 --- a/src/components/widget/Attributes/Attributes.js +++ b/src/components/widget/Attributes/Attributes.js @@ -126,7 +126,10 @@ class Attributes extends Component { //there are required values that are not set. just close if (mandatory.length && !valid){ - return this.handleToggle(false); + if(window.confirm('Do you really want to leave?')){ + this.handleToggle(false); + } + return; } dispatch(completeRequest(attributeType, attrId)).then(response => {