mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-30 14:40:34 +02:00
Etemplate: Fix push add to an empty nextmatch would leave the 'No matches found' and throw errors for row actions
This commit is contained in:
@ -467,8 +467,15 @@ export class et2_dataview_controller
|
||||
this._grid.insertRow(_entry.idx, _entry.row);
|
||||
}
|
||||
|
||||
// Remove 'No matches found' row
|
||||
var row = jQuery(".egwGridView_empty",this._grid.innerTbody).remove();
|
||||
if(row.length)
|
||||
{
|
||||
this._selectionMgr.unregisterRow("", 0);
|
||||
}
|
||||
|
||||
// Update index map only for push (autorefresh disabled)
|
||||
if(this._indexMap[_entry.idx].uid !== _entry.uid)
|
||||
if(this._indexMap[_entry.idx] && 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--)
|
||||
@ -481,8 +488,8 @@ export class et2_dataview_controller
|
||||
this._selectionMgr._registeredRows[entry.uid].idx = entry.idx;
|
||||
}
|
||||
}
|
||||
this._indexMap[_entry.idx] = _entry
|
||||
}
|
||||
this._indexMap[_entry.idx] = _entry;
|
||||
|
||||
return this.hasData;
|
||||
}
|
||||
|
Reference in New Issue
Block a user