Fix evaluated filters overwriting configuration
This commit is contained in:
parent
b6b8f1b8b7
commit
03ec8d3930
@ -328,10 +328,7 @@ export default {
|
|||||||
case compose.PageBlockCalendar.feedResources.record:
|
case compose.PageBlockCalendar.feedResources.record:
|
||||||
return this.findModuleByID({ namespace: this.namespace, moduleID: feed.options.moduleID })
|
return this.findModuleByID({ namespace: this.namespace, moduleID: feed.options.moduleID })
|
||||||
.then(module => {
|
.then(module => {
|
||||||
const ff = {
|
const ff = compose.PageBlockCalendar.makeFeed(feed) // Clone feed, so we don't modify the original
|
||||||
...feed,
|
|
||||||
options: { ...feed.options },
|
|
||||||
}
|
|
||||||
|
|
||||||
// Interpolate prefilter variables
|
// Interpolate prefilter variables
|
||||||
if (ff.options.prefilter) {
|
if (ff.options.prefilter) {
|
||||||
|
|||||||
@ -190,9 +190,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Promise.all(this.options.feeds.filter(f => f.isValid()).map((feed, idx) => {
|
Promise.all(this.options.feeds.filter(f => f.isValid()).map((feed, idx) => {
|
||||||
return this.findModuleByID({ namespace: this.namespace, moduleID: feed.options.moduleID })
|
return this.findModuleByID({ namespace: this.namespace, moduleID: feed.options.moduleID }).then(module => {
|
||||||
.then(module => {
|
const f = compose.PageBlockGeometry.makeFeed(feed) // Clone feed, so we don't modify the original
|
||||||
const f = { ...feed } // Clone feed, so we dont modify the original
|
|
||||||
|
|
||||||
// Interpolate prefilter variables
|
// Interpolate prefilter variables
|
||||||
if (f.options.prefilter) {
|
if (f.options.prefilter) {
|
||||||
|
|||||||
@ -166,6 +166,7 @@ export default {
|
|||||||
if (m.moduleID) {
|
if (m.moduleID) {
|
||||||
// prepare a fresh metric with an evaluated prefilter
|
// prepare a fresh metric with an evaluated prefilter
|
||||||
const auxM = { ...m }
|
const auxM = { ...m }
|
||||||
|
|
||||||
if (auxM.filter) {
|
if (auxM.filter) {
|
||||||
auxM.filter = evaluatePrefilter(auxM.filter, {
|
auxM.filter = evaluatePrefilter(auxM.filter, {
|
||||||
record: this.record,
|
record: this.record,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user