From d525347275a2268ed9624d35ddbd4e43a345179d Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 26 Aug 2020 09:26:18 -0600 Subject: [PATCH] Fix nm displayed row count was not updated when adding a row. This seems to have resolved the issue of the last row going missing. --- api/js/etemplate/et2_extension_nextmatch.js | 2 ++ api/js/etemplate/et2_extension_nextmatch.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index cf5d356355..3567542559 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -608,6 +608,8 @@ var et2_nextmatch = /** @class */ (function (_super) { if (index === false) { return false; } + // Increase displayed row count + this.controller._grid.setTotalCount(this.controller._grid.getTotalCount() + 1); // Insert at the top of the list, or where app said var entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid); entry.idx = typeof index == "number" ? index : 0; diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index f2f99bd636..d956c614b8 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -911,6 +911,9 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 return false; } + // Increase displayed row count + this.controller._grid.setTotalCount(this.controller._grid.getTotalCount()+1); + // Insert at the top of the list, or where app said var entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid); entry.idx = typeof index == "number" ? index : 0;