From a88c53b9f5becc5120044f2d5ade830360696b16 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 20 Jan 2025 09:20:54 -0700 Subject: [PATCH] Fix missing column(s) / duplicated headers / missing customfield filters Can't use 'rows' namespace for headers, it misses some things and triggers autorepeat in some templates. --- api/js/etemplate/et2_extension_nextmatch.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 7bd22a7ea7..916a8d0c5c 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -2420,9 +2420,20 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 { const template = loadWebComponent("et2-template", { "id": template_name, - class: "hideme", - content: "rows" + class: "hideme" }, this); + // Some apps send header data in 'rows', which is the wrong namespace. Passing it into the header can trigger + // autorepeat in some cases, so pass just the non-numeric keys into header namespace. Some headers also use content + // in the parent nm namespace, just to complicate things. + let rows = this.getArrayMgr("content").getEntry("rows"); + Object.keys(rows).forEach(k => + { + if(isNaN(k)) + { + this.getArrayMgr("content").data[k] = rows[k]; + } + }); + if(this.template) { // Stop early to prevent unneeded processing, and prevent infinite