Skip to content

Commit 6389161

Browse files
v23entv23ent
authored andcommitted
added check for transient filters in controller
..and filling filters from widget only if there are not transient filters in controller. If there are ones, we assume that controller has all the filters and we do not need to check for filters on widget.
1 parent e604896 commit 6389161

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

export/LightPivotTable-DeepSeePortlet.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,17 @@
262262
}
263263
}
264264
}
265-
// Getting filters from controller, if it has filters filled...
265+
// Getting filters from controller, if it has filters added from URL or default...
266+
// such filters are marked as "transient"
266267
if (controller.filters.length) {
267268
for (i in controller.filters) {
268-
if (controller.filters[i].enabled) defaultFilters.push(controller.filters[i].spec);
269+
if (controller.filters[i].enabled && controller.filters[i].transient)
270+
defaultFilters.push(controller.filters[i].spec);
269271
}
272+
}
270273
// ... if not, we'll get filters from widget's controls
271-
} else if (widget.filterState instanceof Object) {
274+
// Only if the controller didn't have transient filters - (!defaultFilters.length)
275+
if (!defaultFilters.length && widget.filterState instanceof Object) {
272276
for (i in widget.filterState)
273277
if (widget.filterState[i]) defaultFilters.push(widget.constructMDXClause(i,widget.filterState[i]));
274278
}

0 commit comments

Comments
 (0)