Fix bug where nextmatch selection manager was holding onto selected rows

This commit is contained in:
nathangray 2018-07-16 16:17:36 -06:00
parent 85d33febc6
commit 658e84e59f
3 changed files with 14 additions and 0 deletions

View File

@ -147,6 +147,9 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({
// Free selection manager
this._selectionMgr.clear();
// Clear object manager
this._objectManager.clear();
// Clear the map
this._indexMap = {}

View File

@ -108,6 +108,10 @@ var et2_dataview_selectionManager = (function(){ "use strict"; return Class.exte
this.unregisterRow(key, this._registeredRows[key].tr);
delete this._registeredRows[key];
}
if(this._actionObjectManager)
{
this._actionObjectManager.clear();
}
this._indexMap = {};
this._total = 0;
this._focusedEntry = null;
@ -234,6 +238,10 @@ var et2_dataview_selectionManager = (function(){ "use strict"; return Class.exte
this._selectAll = true;
if(Object.keys(this._registeredRows).length != this._total)
{
this._selectRange(0, this._total);
}
// Tell action manager to do all
this._actionObjectManager.setAllSelected(true);

View File

@ -489,6 +489,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
changed = true;
keep_selection = true;
this.controller._selectionMgr.resetSelection();
this.controller._objectManager.clear();
for(var i in _set.selected)
{
this.controller._selectionMgr.setSelected(_set.selected[i].indexOf('::') > 0 ? _set.selected[i] : this.controller.dataStorePrefix + '::'+_set.selected[i],true);
@ -514,6 +515,8 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
{
// Do not keep selection
this.controller._selectionMgr.resetSelection();
this.controller._objectManager.clear();
this.controller.keepSelection();
}
// Update the filters in the grid controller