Skip to content

Commit 8d31531

Browse files
author
Denys Rul
committed
MAGETWO-70294: [GitHub] Mass Actions with Childs don't work in CMS #9854
1 parent c17c5df commit 8d31531

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,20 @@ define([
3838
* Recursive initializes observable actions.
3939
*
4040
* @param {Array} actions - Action objects.
41+
* @param {String} [prefix] - An optional string that will be prepended
42+
* to the "type" field of all child actions.
4143
* @returns {Massactions} Chainable.
4244
*/
43-
recursiveObserveActions: function (actions) {
45+
recursiveObserveActions: function (actions, prefix) {
4446
_.each(actions, function (action) {
47+
if (prefix) {
48+
action.type = prefix + '.' + action.type;
49+
}
50+
4551
if (action.actions) {
4652
action.visible = ko.observable(false);
4753
action.parent = actions;
48-
this.recursiveObserveActions(action.actions);
54+
this.recursiveObserveActions(action.actions, action.type);
4955
}
5056
}, this);
5157

0 commit comments

Comments
 (0)