Skip to content

Commit f97a103

Browse files
committed
MC-37069: Configurable Products with large quantities of children cannot be opened
1 parent 3afe4ca commit f97a103

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/components/dynamic-rows-configurable.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ define([
242242
this.generateAssociatedProducts();
243243
},
244244

245+
setInitialProperty: function () {
246+
return this;
247+
},
248+
245249
/**
246250
* Parsed data
247251
*

app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,9 @@ define([
11261126
* Update whether value differs from default value
11271127
*/
11281128
setDifferedFromDefault: function () {
1129+
var recordData;
11291130
if (this.default) {
1130-
var recordData = utils.copy(this.recordData());
1131+
recordData = utils.copy(this.recordData());
11311132

11321133
Array.isArray(recordData) && recordData.forEach(function (item) {
11331134
delete item['record_id'];

lib/web/mage/utils/objects.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,16 @@ define([
247247
* @returns {Object|Array} Cloned object.
248248
*/
249249
copy: function (data) {
250-
return _.clone(data)
250+
var result = data,
251+
isArray = Array.isArray(data),
252+
placeholder;
253+
254+
if (this.isObject(data) || isArray) {
255+
placeholder = isArray ? [] : {};
256+
result = this.extend(placeholder, data);
257+
}
258+
259+
return result;
251260
},
252261

253262
/**

0 commit comments

Comments
 (0)