Fix removing a nm row did not re-index

This caused duplications or holes depending on what you did before or after
This commit is contained in:
nathangray 2020-08-07 14:12:30 -06:00
parent ff35f58f73
commit afec14a17e
2 changed files with 2 additions and 2 deletions

View File

@ -576,7 +576,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
var entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
// Need to delete first as there's a good chance indexes will change in an unknown way
// and we can't always find it by UID after due to duplication
this.controller._grid.deleteRow(entry.idx);
this.controller.deleteRow(uid);
// Pretend it's a new row, let app tell us where it goes and we'll mark it as new
if (!this.refresh_add(uid, et2_nextmatch.UPDATE)) {
// App did not want the row, or doesn't know where it goes but we've already removed it...

View File

@ -870,7 +870,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
// Need to delete first as there's a good chance indexes will change in an unknown way
// and we can't always find it by UID after due to duplication
this.controller._grid.deleteRow(entry.idx);
this.controller.deleteRow(uid);
// Pretend it's a new row, let app tell us where it goes and we'll mark it as new
if(!this.refresh_add(uid, et2_nextmatch.UPDATE))