Skip to content

Commit

Permalink
LPT widget refresh filters apply fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Dec 28, 2015
1 parent e339662 commit d91a8a7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions export/LightPivotTable-DeepSeePortlet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,19 @@
this.LightPivotTable.CONFIG["defaultFilterSpecs"] = [];
// updateFilters
for (var i in controller.filters) {
this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(controller.filters[i].spec);
// Getting filters from controller, if it has filters added from URL or default...
// such filters are marked as "transient"
if (controller.filters.length) {
for (i in controller.filters) {
if (controller.filters[i].enabled && controller.filters[i].transient)
this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(controller.filters[i].spec);
}
}
// ... if not, we'll get filters from widget's controls
// Only if the controller didn't have transient filters - (!defaultFilters.length)
if (!this.LightPivotTable.CONFIG["defaultFilterSpecs"].length && widget.filterState instanceof Object) {
for (i in widget.filterState)
if (widget.filterState[i]) this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(widget.constructMDXClause(i, widget.filterState[i]));
}
if (controller.contextFilterSpec) {
this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(controller.contextFilterSpec);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "LightPivotTable",
"author": "ZitRo",
"version": "1.4.6",
"version": "1.4.7",
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
"main": "test/testServer.js",
"repository": {
Expand Down

0 comments on commit d91a8a7

Please sign in to comment.