Skip to content

Commit 6987006

Browse files
committed
MAGETWO-37928: Cannot remove address on Customer create on Backend
- Fix loader behavior in _area_ component
1 parent 809421e commit 6987006

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

app/code/Magento/Ui/view/base/web/js/form/components/area.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ define([
2121
* Calls initListeners and pushParams methods.
2222
*/
2323
initialize: function () {
24-
_.bindAll(this, 'onChildrenUpdate', 'onContentLoading', 'onContentLoaded');
24+
_.bindAll(this, 'onChildrenUpdate', 'onContentLoading');
2525

2626
return this._super();
2727
},
@@ -49,8 +49,7 @@ define([
4949

5050
elem.on({
5151
'update': this.onChildrenUpdate,
52-
'loading': this.onContentLoading,
53-
'loaded': this.onContentLoaded
52+
'loading': this.onContentLoading
5453
});
5554

5655
return this;
@@ -75,15 +74,8 @@ define([
7574
/**
7675
* Callback that sets loading property to true.
7776
*/
78-
onContentLoading: function () {
79-
this.loading(true);
80-
},
81-
82-
/**
83-
* Callback that sets loading property to true.
84-
*/
85-
onContentLoaded: function () {
86-
this.loading(false);
77+
onContentLoading: function (isLoading) {
78+
this.loading(isLoading);
8779
}
8880
});
8981
});

app/code/Magento/Ui/view/base/web/js/form/components/html.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ define([
1414
content: '',
1515
showSpinner: false,
1616
loading: false,
17-
template: 'ui/content/content',
18-
listens: {
19-
loading: 'toggleLoadState'
20-
}
17+
template: 'ui/content/content'
2118
},
2219

2320
/**
@@ -83,10 +80,6 @@ define([
8380
}
8481
},
8582

86-
toggleLoadState: function (value) {
87-
this.trigger(value ? 'loading' : 'loaded');
88-
},
89-
9083
/**
9184
* Defines if instance has 'content' property defined.
9285
*

0 commit comments

Comments
 (0)