mirror of
https://github.com/nasa/openmct.git
synced 2025-01-29 23:53:56 +00:00
cherry-pick #7863 83e4a124e2a6727651d82acd49eb1854b4f105ac
This commit is contained in:
parent
50e60e7824
commit
9cfbb966e2
@ -150,13 +150,13 @@ export default class TableRowCollection extends EventEmitter {
|
||||
}
|
||||
|
||||
insertOrUpdateRows(rowsToAdd, addToBeginning) {
|
||||
rowsToAdd.forEach((row) => {
|
||||
rowsToAdd.forEach((row, addRowsIndex) => {
|
||||
const index = this.getInPlaceUpdateIndex(row);
|
||||
if (index > -1) {
|
||||
this.updateRowInPlace(row, index);
|
||||
} else {
|
||||
if (addToBeginning) {
|
||||
this.rows.unshift(row);
|
||||
this.rows.splice(addRowsIndex, 0, row);
|
||||
} else {
|
||||
this.rows.push(row);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user