From 03a5620ea9e1529e617d70d1896a52e71eb286db Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 9 Jun 2020 13:56:52 -0600 Subject: [PATCH] Api: Fix nm columns disabled via content could break subsequent columns, giving JS error "Uncaught TypeError: Cannot read property 'getAttribute' of undefined" --- api/js/etemplate/et2_extension_nextmatch.js | 1 + api/js/etemplate/et2_extension_nextmatch.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 4f4cc04ead..99b03b2397 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -892,6 +892,7 @@ var et2_nextmatch = /** @class */ (function (_super) { if (_colData[x].disabled && _colData[x].disabled !== '' && this.getArrayMgr("content").parseBoolExpression(_colData[x].disabled)) { visibility = et2_dataview_model_columns_1.et2_dataview_column.ET2_COL_VISIBILITY_DISABLED; + this.columns[x].visible = false; } columnData[x] = { "id": "col_" + x, diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 1f7b21c5cf..86ee94d9fc 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -1245,6 +1245,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 this.getArrayMgr("content").parseBoolExpression(_colData[x].disabled)) { visibility = et2_dataview_column.ET2_COL_VISIBILITY_DISABLED; + this.columns[x].visible = false; } columnData[x] = { "id": "col_" + x,