Etemplate: Fix some nm / push bugs

- Handling for sub-grids
- Fix some index issues in selectionMgr causing rows to jump around
This commit is contained in:
nathangray
2020-08-25 15:57:20 -06:00
parent 8cd05c571b
commit 030dafc0a7
6 changed files with 61 additions and 10 deletions

View File

@ -491,8 +491,13 @@ export class et2_dataview_controller
let max = parseInt(Object.keys(this._indexMap).reduce((a, b) => this._indexMap[a] > this._indexMap[b] ? a : b));
for(let idx = max; idx >= _entry.idx; idx--)
{
let entry = this._indexMap[idx];
this._indexMap[idx].idx = idx+1;
this._indexMap[this._indexMap[idx].idx] = this._indexMap[idx];
if(this._selectionMgr && this._selectionMgr._registeredRows[entry.uid])
{
this._selectionMgr._registeredRows[entry.uid].idx = entry.idx;
}
}
this._indexMap[_entry.idx] = _entry
}