File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 131131 this.LightPivotTable.CONFIG["defaultFilterSpecs"] = [];
132132
133133 // updateFilters
134- for (var i in controller.filters) {
135- this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(controller.filters[i].spec);
134+ // Getting filters from controller, if it has filters added from URL or default...
135+ // such filters are marked as "transient"
136+ if (controller.filters.length) {
137+ for (i in controller.filters) {
138+ if (controller.filters[i].enabled && controller.filters[i].transient)
139+ this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(controller.filters[i].spec);
140+ }
141+ }
142+ // ... if not, we'll get filters from widget's controls
143+ // Only if the controller didn't have transient filters - (!defaultFilters.length)
144+ if (!this.LightPivotTable.CONFIG["defaultFilterSpecs"].length && widget.filterState instanceof Object) {
145+ for (i in widget.filterState)
146+ if (widget.filterState[i]) this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(widget.constructMDXClause(i, widget.filterState[i]));
136147 }
137148 if (controller.contextFilterSpec) {
138149 this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(controller.contextFilterSpec);
Original file line number Diff line number Diff line change 11{
22 "name" : " LightPivotTable" ,
33 "author" : " ZitRo" ,
4- "version" : " 1.4.6 " ,
4+ "version" : " 1.4.7 " ,
55 "description" : " A lightweight pivot table for MDX2JSON source for InterSystems Cache" ,
66 "main" : " test/testServer.js" ,
77 "repository" : {
You can’t perform that action at this time.
0 commit comments