Skip to content

Commit d6407a2

Browse files
committed
Multiple clicks in massaction dropdown generates multiple post request
1 parent 15ea8fd commit d6407a2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/code/Magento/Ui/view/base/web/js/grid/massactions.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ define([
2626
noItemsMsg: $t('You haven\'t selected any items!'),
2727
modules: {
2828
selections: '${ $.selectProvider }'
29-
}
29+
},
30+
clickedOnce: false,
3031
},
3132

3233
/**
@@ -48,6 +49,10 @@ define([
4849
* @returns {Massactions} Chainable.
4950
*/
5051
applyAction: function (actionIndex) {
52+
if (this.clickedOnce) {
53+
return this;
54+
}
55+
5156
var data = this.getSelections(),
5257
action,
5358
callback;
@@ -66,6 +71,8 @@ define([
6671
action.confirm ?
6772
this._confirm(action, callback) :
6873
callback();
74+
75+
this.clickedOnce = true;
6976

7077
return this;
7178
},

0 commit comments

Comments
 (0)