Remove workaround, fix 3 second refresh

This commit is contained in:
nathangray
2020-08-26 14:39:39 -06:00
parent a013d78947
commit 6b5414904f
4 changed files with 5 additions and 40 deletions

View File

@ -62,9 +62,6 @@ export class et2_dataview_controller
private _objectManager: any;
// @todo remove it after finding a right fix
private _disable_autorefresh: boolean;
/**
* Constructor of the et2_dataview_controller, connects to the grid
* callback.
@ -136,20 +133,6 @@ export class et2_dataview_controller
}
}
/**
* Enable or disable autorefresh
*
* disable_autorefresh is used to detect that we have active push in order to enable a fix for push
* on _insertDataRow function reindexing the _indexMap which is wrong for the full refresh.
*
* @param disabled
* @todo remove it after finding a right fix
*/
set_disable_autorefresh( disabled : boolean)
{
this._disable_autorefresh = disabled;
}
/**
* @param value is an object implementing the et2_IDataProvider
* interface
@ -484,9 +467,8 @@ export class et2_dataview_controller
this._grid.insertRow(_entry.idx, _entry.row);
}
//@todo remove it after finding a right fix
// Update index map only for push (autorefresh disabled)
if(this._disable_autorefresh && this._indexMap[_entry.idx].uid !== _entry.uid)
if(this._indexMap[_entry.idx].uid !== _entry.uid)
{
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--)