mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Etemplate: Don't try to delete row if it's not in the nextmatch
This commit is contained in:
parent
d525347275
commit
075c44a48b
@ -501,6 +501,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
||||
// Record current & next index
|
||||
var uid = _row_ids[0].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[0] : this.controller.dataStorePrefix + "::" + _row_ids[0];
|
||||
var entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
|
||||
if (entry && entry.idx !== null) {
|
||||
var next = (entry.ao ? entry.ao.getNext(_row_ids.length) : null);
|
||||
if (next == null || !next.id || next.id == uid) {
|
||||
// No next, select previous
|
||||
@ -527,6 +528,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
||||
this.dataview.grid.doInvalidate = true;
|
||||
this.dataview.grid.invalidate();
|
||||
}
|
||||
}
|
||||
id_loop: for (var i = 0; i < _row_ids.length; i++) {
|
||||
var uid = _row_ids[i].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[i] : this.controller.dataStorePrefix + "::" + _row_ids[i];
|
||||
switch (_type) {
|
||||
|
@ -778,6 +778,8 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
// Record current & next index
|
||||
var uid = _row_ids[0].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[0] : this.controller.dataStorePrefix + "::" + _row_ids[0];
|
||||
const entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
|
||||
if(entry && entry.idx !== null)
|
||||
{
|
||||
let next = (entry.ao ? entry.ao.getNext(_row_ids.length) : null);
|
||||
if(next == null || !next.id || next.id == uid)
|
||||
{
|
||||
@ -811,6 +813,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
this.dataview.grid.doInvalidate = true;
|
||||
this.dataview.grid.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
id_loop:
|
||||
for(var i = 0; i < _row_ids.length; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user