Etemplate: Make sure controller has current filters when created. Fixes scrolling to trigger fetching more rows did not pass initial filters.

This commit is contained in:
nathangray 2020-10-15 14:56:23 -06:00
parent 0df6306dc2
commit c78c8cc215
2 changed files with 3 additions and 0 deletions

View File

@ -1199,6 +1199,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
this.rowProvider.setDataRowTemplate(columnWidgets, _rowData, this); this.rowProvider.setDataRowTemplate(columnWidgets, _rowData, this);
// Create the grid controller // Create the grid controller
this.controller = new et2_extension_nextmatch_controller_1.et2_nextmatch_controller(null, this.egw(), this.getInstanceManager().etemplate_exec_id, this, null, this.dataview.grid, this.rowProvider, this.options.settings.action_links, null, this.options.actions); this.controller = new et2_extension_nextmatch_controller_1.et2_nextmatch_controller(null, this.egw(), this.getInstanceManager().etemplate_exec_id, this, null, this.dataview.grid, this.rowProvider, this.options.settings.action_links, null, this.options.actions);
this.controller.setFilters(this.activeFilters);
// Need to trigger empty row the first time // Need to trigger empty row the first time
if (total == 0) if (total == 0)
this.controller._emptyRow(); this.controller._emptyRow();

View File

@ -1664,6 +1664,8 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
this.options.actions this.options.actions
); );
this.controller.setFilters(this.activeFilters)
// Need to trigger empty row the first time // Need to trigger empty row the first time
if(total == 0) this.controller._emptyRow(); if(total == 0) this.controller._emptyRow();