diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index f6c44c7595..0ebedc2781 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -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); }; diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 0c040bacb1..e40d023703 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -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); };