Etemplate: Row count does not depend on data.class

This commit is contained in:
nathangray 2020-09-01 12:22:47 -06:00
parent df57ea914e
commit b7b4cb31c8
2 changed files with 9 additions and 5 deletions

View File

@ -612,10 +612,12 @@ var et2_nextmatch = /** @class */ (function (_super) {
// Set "new entry" class - but it has to stay so register and re-add it after the data is there
entry.row.tr.addClass("new_entry");
var callback = function (data) {
if (data && data.class) {
data.class += " new_entry";
if (data) {
// Increase displayed row count
this.controller._grid.setTotalCount(this.controller._grid.getTotalCount() + 1);
if (data.class) {
data.class += " new_entry";
}
}
this.egw().dataUnregisterUID(uid, callback, this);
};

View File

@ -916,12 +916,14 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
// Set "new entry" class - but it has to stay so register and re-add it after the data is there
entry.row.tr.addClass("new_entry");
let callback = function(data) {
if(data && data.class)
if(data)
{
data.class += " new_entry";
// Increase displayed row count
this.controller._grid.setTotalCount(this.controller._grid.getTotalCount()+1);
if(data.class)
{
data.class += " new_entry";
}
}
this.egw().dataUnregisterUID(uid, callback, this);
};