File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
view/base/ui_component/etc Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 6
6
namespace Magento \Ui \Component ;
7
7
8
8
/**
9
+ * Mass action UI component.
10
+ *
9
11
* @api
10
12
* @since 100.0.2
11
13
*/
@@ -21,7 +23,12 @@ public function prepare()
21
23
$ config = $ this ->getConfiguration ();
22
24
23
25
foreach ($ this ->getChildComponents () as $ actionComponent ) {
24
- $ config ['actions ' ][] = $ actionComponent ->getConfiguration ();
26
+ $ componentConfig = $ actionComponent ->getConfiguration ();
27
+ $ disabledAction = $ componentConfig ['actionDisable ' ] ?? false ;
28
+ if ($ disabledAction ) {
29
+ continue ;
30
+ }
31
+ $ config ['actions ' ][] = $ componentConfig ;
25
32
}
26
33
27
34
$ origConfig = $ this ->getConfiguration ();
Original file line number Diff line number Diff line change 14
14
<item name =" label" type =" string" translate =" true" xsi : type =" xpath" >settings/label</item >
15
15
<item name =" type" type =" string" xsi : type =" xpath" >settings/type</item >
16
16
<item name =" url" type =" url" xsi : type =" converter" >settings/url</item >
17
+ <item name =" actionDisable" type =" boolean" xsi : type =" xpath" >settings/actionDisable</item >
17
18
<item name =" confirm" xsi : type =" array" >
18
19
<item name =" title" type =" string" translate =" true" xsi : type =" xpath" >settings/confirm/title</item >
19
20
<item name =" message" type =" string" translate =" true" xsi : type =" xpath" >settings/confirm/message</item >
Original file line number Diff line number Diff line change 49
49
</xs : documentation >
50
50
</xs : annotation >
51
51
</xs : element >
52
+ <xs : element name =" actionDisable" type =" xs:boolean" >
53
+ <xs : annotation >
54
+ <xs : documentation >
55
+ Disable and remove this action.
56
+ </xs : documentation >
57
+ </xs : annotation >
58
+ </xs : element >
52
59
</xs : choice >
53
60
<xs : attribute name =" name" use =" required" />
54
61
</xs : complexType >
82
89
</xs : documentation >
83
90
</xs : annotation >
84
91
</xs : element >
92
+ <xs : element name =" actionDisable" type =" xs:boolean" >
93
+ <xs : annotation >
94
+ <xs : documentation >
95
+ Disable and remove this action.
96
+ </xs : documentation >
97
+ </xs : annotation >
98
+ </xs : element >
85
99
<xs : element name =" confirm" type =" confirmType" >
86
100
<xs : annotation >
87
101
<xs : documentation >
You can’t perform that action at this time.
0 commit comments