File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/components Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ define([
11
11
12
12
return Abstract . extend ( {
13
13
defaults : {
14
- listens : {
15
- isConfigurable : 'handlePriceValue'
16
- } ,
17
14
imports : {
18
15
isConfigurable : '!ns = ${ $.ns }, index = configurable-matrix:isEmpty'
19
16
} ,
@@ -22,12 +19,15 @@ define([
22
19
}
23
20
} ,
24
21
25
- /**
26
- * Invokes initialize method of parent class,
27
- * contains initialization logic
28
- */
22
+ /** @inheritdoc */
29
23
initialize : function ( ) {
30
24
this . _super ( ) ;
25
+ // resolve initial disable state
26
+ this . handlePriceValue ( this . isConfigurable ) ;
27
+ // add listener to track "configurable" type
28
+ this . setListeners ( {
29
+ isConfigurable : 'handlePriceValue'
30
+ } ) ;
31
31
32
32
return this ;
33
33
} ,
@@ -50,11 +50,10 @@ define([
50
50
* @param {String } isConfigurable
51
51
*/
52
52
handlePriceValue : function ( isConfigurable ) {
53
+ this . disabled ( ! ! this . isUseDefault ( ) || isConfigurable ) ;
54
+
53
55
if ( isConfigurable ) {
54
- this . disable ( ) ;
55
56
this . clear ( ) ;
56
- } else {
57
- this . enable ( ) ;
58
57
}
59
58
}
60
59
} ) ;
You can’t perform that action at this time.
0 commit comments