File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ define([
19
19
formData : { } ,
20
20
totalProductCount : 0 ,
21
21
totalDisabledProducts : 0 ,
22
+ category_ids : '' ,
22
23
listens : {
23
24
conditionOption : 'updateProductTotals' ,
24
25
conditionValue : 'updateProductTotals' ,
26
+ formData : 'updateProductTotals'
25
27
} ,
26
28
imports : {
27
29
formData : '${ $.provider }:data'
@@ -46,14 +48,17 @@ define([
46
48
*
47
49
*/
48
50
updateProductTotals : _ . debounce ( function ( ) {
49
- if ( ! this . conditionOption || _ . isEmpty ( this . formData ) ) {
51
+ if ( ! this . conditionOption || _ . isEmpty ( this . formData ) ||
52
+ ( this . conditionOption === 'category_ids' && this . category_ids === this . formData [ 'category_ids' ] ) ) {
50
53
return ;
51
54
}
52
55
53
- if ( this . conditionOption === 'category_ids' && typeof this . formData [ this . conditionOption ] != "string" ) {
54
- this . formData [ this . conditionOption ] = '' ;
56
+ if ( this . conditionOption === 'category_ids' && typeof this . formData [ 'category_ids' ] != "string" ) {
57
+ this . formData [ 'category_ids' ] = '' ;
55
58
}
56
59
60
+ this . category_ids = this . conditionOption === 'category_ids' ? this . formData [ 'category_ids' ] : '' ;
61
+
57
62
_ . extend ( this . formData , this . conditionValue ) ;
58
63
conditionsDataProcessor ( this . formData , this . conditionOption + '_source' ) ;
59
64
You can’t perform that action at this time.
0 commit comments