diff --git a/src/gridz/GridCtrl.js b/src/gridz/GridCtrl.js index a2ebc53a6..e3d4a4950 100644 --- a/src/gridz/GridCtrl.js +++ b/src/gridz/GridCtrl.js @@ -419,7 +419,8 @@ export default class GridCtrl { // to be able to set default filters on the first load const q = p.q ? JSON.parse(p.q): {} const permanentFilters = this.listCtrl?.permanentFilters || {} - p.q = JSON.stringify({ ...q, ...searchModel , ...permanentFilters}) + const initSearch = this.listCtrl?.initSearch || {} + p.q = JSON.stringify({...initSearch, ...q, ...searchModel, ...permanentFilters}) const data = await this.dataApi.search(p) this.addJSONData(data) } catch (er) { diff --git a/src/ng/gridz/list/BaseListCtrl.js b/src/ng/gridz/list/BaseListCtrl.js index e5d7e0bec..b8e33a328 100644 --- a/src/ng/gridz/list/BaseListCtrl.js +++ b/src/ng/gridz/list/BaseListCtrl.js @@ -34,7 +34,7 @@ export default class BaseListCtrl { } extendFilters(filters) { - return _.merge({}, filters || {}, this.permanentFilters) + return _.merge(this.initSearch || {}, filters || {}, this.permanentFilters) } async doConfig(cfg) {