Skip to content

Commit d91a8a7

Browse files
LPT widget refresh filters apply fix
1 parent e339662 commit d91a8a7

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

export/LightPivotTable-DeepSeePortlet.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,19 @@
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);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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": {

0 commit comments

Comments
 (0)