File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
app/code/Magento/Ui/view/base/web/js/grid Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ define([
2727 modules : {
2828 selections : '${ $.selectProvider }'
2929 } ,
30- clickedOnce : false ,
30+ actionClicked : false ,
3131 } ,
3232
3333 /**
@@ -49,10 +49,6 @@ define([
4949 * @returns {Massactions } Chainable.
5050 */
5151 applyAction : function ( actionIndex ) {
52- if ( this . clickedOnce ) {
53- return this ;
54- }
55-
5652 var data = this . getSelections ( ) ,
5753 action ,
5854 callback ;
@@ -66,13 +62,24 @@ define([
6662 }
6763
6864 action = this . getAction ( actionIndex ) ;
65+
66+ if ( action . actionClicked && ! action . timeoutExpired ) {
67+ return this ;
68+ }
6969 callback = this . _getCallback ( action , data ) ;
7070
7171 action . confirm ?
7272 this . _confirm ( action , callback ) :
7373 callback ( ) ;
74-
75- this . clickedOnce = true ;
74+
75+ this . actions ( ) . forEach ( function ( item ) {
76+ item . actionClicked = ( item . type === actionIndex ) ;
77+ } )
78+
79+ action . timeoutExpired = false ;
80+ setTimeout ( function ( ) {
81+ action . timeoutExpired = true ;
82+ } , 3000 ) ;
7683
7784 return this ;
7885 } ,
You can’t perform that action at this time.
0 commit comments