Skip to content

Commit da76542

Browse files
AC-2020:Error:Dynamic rows component behaves incorrectly when a new element is added
1 parent 301f6d4 commit da76542

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ define([
259259
}
260260

261261
this.source.set(this.dataScope + '.' + this.index + '.' + this.recordData().length, obj);
262-
obj.position = this.recordData().length - 1;
263262
},
264263

265264
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ define([
801801
var max = 0,
802802
pos;
803803

804-
this.elems.each(function (record) {
804+
this.recordData.each(function (record) {
805805
pos = ~~record.position;
806806
pos > max ? max = pos : false;
807807
});

0 commit comments

Comments
 (0)