File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Cms/view/adminhtml/ui_component
Ui/view/base/web/js/form/element Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 151
151
</argument >
152
152
<argument name =" data" xsi : type =" array" >
153
153
<item name =" config" xsi : type =" array" >
154
- <item name =" caption" xsi : type =" string" translate =" true" >All Store Views</item >
155
154
<item name =" dataScope" xsi : type =" string" >store_id</item >
156
155
<item name =" label" xsi : type =" string" translate =" true" >Store View</item >
156
+ <item name =" captionValue" xsi : type =" string" >0</item >
157
157
</item >
158
158
</argument >
159
159
</filterSelect >
Original file line number Diff line number Diff line change 153
153
<argument name =" data" xsi : type =" array" >
154
154
<item name =" config" xsi : type =" array" >
155
155
<item name =" dataScope" xsi : type =" string" >store_id</item >
156
- <item name =" caption" xsi : type =" string" translate =" true" >All Store Views</item >
157
156
<item name =" label" xsi : type =" string" translate =" true" >Store View</item >
157
+ <item name =" captionValue" xsi : type =" string" >0</item >
158
158
</item >
159
159
</argument >
160
160
</filterSelect >
Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ define([
31
31
* @param {Array } nodes
32
32
* @return {Object }
33
33
*/
34
- function parseOptions ( nodes ) {
34
+ function parseOptions ( nodes , captionValue ) {
35
35
var caption ,
36
36
value ;
37
37
38
38
nodes = _ . map ( nodes , function ( node ) {
39
39
value = node . value ;
40
40
41
- if ( value === null || value === '' ) {
41
+ if ( value === null || value === captionValue ) {
42
42
if ( _ . isUndefined ( caption ) ) {
43
43
caption = node . label ;
44
44
}
@@ -131,7 +131,9 @@ define([
131
131
* @returns {Object } Chainable.
132
132
*/
133
133
initConfig : function ( config ) {
134
- var result = parseOptions ( config . options ) ;
134
+ var options = config . options ,
135
+ captionValue = config . captionValue || '' ,
136
+ result = parseOptions ( options , captionValue ) ;
135
137
136
138
if ( config . caption ) {
137
139
delete result . caption ;
You can’t perform that action at this time.
0 commit comments