File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Checkout/Test/Mftf/Section
Ui/view/base/web/js/form/element Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 33
33
<element name =" defaultShipping" type =" button" selector =" .billing-address-details" />
34
34
<element name =" state" type =" button" selector =" //*[text()='Alabama']" />
35
35
<element name =" stateInput" type =" input" selector =" input[name=region]" />
36
+ <element name =" regionOptions" type =" select" selector =" select[name=region_id] option" />
36
37
</section >
37
38
</sections >
Original file line number Diff line number Diff line change 32
32
<data key =" vat_id" >vatData</data >
33
33
<data key =" default_shipping" >true</data >
34
34
<data key =" default_billing" >true</data >
35
+ <data key =" region_qty" >66</data >
35
36
</entity >
36
37
<entity name =" US_Address_TX" type =" address" >
37
38
<data key =" firstname" >John</data >
Original file line number Diff line number Diff line change @@ -78,13 +78,12 @@ define([
78
78
* @param {String } field
79
79
*/
80
80
filter : function ( value , field ) {
81
- var country = registry . get ( this . parentName + '.' + 'country_id' ) ,
82
- option ;
81
+ var superFn = this . _super ;
83
82
84
- if ( country ) {
85
- option = country . indexedOptions [ value ] ;
83
+ registry . get ( this . parentName + '.' + 'country_id' , function ( country ) {
84
+ var option = country . indexedOptions [ value ] ;
86
85
87
- this . _super ( value , field ) ;
86
+ superFn . call ( this , value , field ) ;
88
87
89
88
if ( option && option [ 'is_region_visible' ] === false ) {
90
89
// hide select and corresponding text input field if region must not be shown for selected country
@@ -94,7 +93,7 @@ define([
94
93
this . toggleInput ( false ) ;
95
94
}
96
95
}
97
- }
96
+ } . bind ( this ) ) ;
98
97
}
99
98
} ) ;
100
99
} ) ;
You can’t perform that action at this time.
0 commit comments