From a4ee20b3eec1b5c7db838c823d6576848f81e891 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 4 Oct 2023 15:13:25 -0600 Subject: [PATCH] Api: Fix unneeded reloads in nm when applying favourite --- api/js/etemplate/et2_extension_nextmatch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 58cdbe4cef..1978c88278 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -1618,7 +1618,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 jQuery.merge(colDisplay, custom_fields); // Update query value, so data source can use visible columns to exclude expensive sub-queries - const oldCols = this.activeFilters.selectcols ? this.activeFilters.selectcols : []; + const oldCols = this.get_columns(); this.activeFilters.selectcols = this.sortedColumnsList.length > 0 ? this.sortedColumnsList : colDisplay; @@ -2234,7 +2234,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 if(this.dataview.rowProvider._columnIds.indexOf(columnMgr.columns[i].id) == -1) { - need_reload = true; + need_reload = need_reload || this.columns[i].visible; } }