mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix(native-filters): filter indicator stale state (#16831)
This commit is contained in:
parent
ef95458547
commit
42fa54881a
@ -212,7 +212,7 @@ export const selectIndicatorsForChart = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
const cachedNativeIndicatorsForChart = {};
|
const cachedNativeIndicatorsForChart = {};
|
||||||
let cachedNativeFilterDataForChart: any = {};
|
const cachedNativeFilterDataForChart: any = {};
|
||||||
const defaultChartConfig = {};
|
const defaultChartConfig = {};
|
||||||
export const selectNativeIndicatorsForChart = (
|
export const selectNativeIndicatorsForChart = (
|
||||||
nativeFilters: Filters,
|
nativeFilters: Filters,
|
||||||
@ -230,10 +230,10 @@ export const selectNativeIndicatorsForChart = (
|
|||||||
cachedNativeIndicatorsForChart[chartId] &&
|
cachedNativeIndicatorsForChart[chartId] &&
|
||||||
areObjectsEqual(cachedFilterData?.appliedColumns, appliedColumns) &&
|
areObjectsEqual(cachedFilterData?.appliedColumns, appliedColumns) &&
|
||||||
areObjectsEqual(cachedFilterData?.rejectedColumns, rejectedColumns) &&
|
areObjectsEqual(cachedFilterData?.rejectedColumns, rejectedColumns) &&
|
||||||
cachedNativeFilterDataForChart?.nativeFilters === nativeFilters &&
|
cachedFilterData?.nativeFilters === nativeFilters &&
|
||||||
cachedNativeFilterDataForChart?.dashboardLayout === dashboardLayout &&
|
cachedFilterData?.dashboardLayout === dashboardLayout &&
|
||||||
cachedNativeFilterDataForChart?.chartConfiguration === chartConfiguration &&
|
cachedFilterData?.chartConfiguration === chartConfiguration &&
|
||||||
cachedNativeFilterDataForChart?.dataMask === dataMask
|
cachedFilterData?.dataMask === dataMask
|
||||||
) {
|
) {
|
||||||
return cachedNativeIndicatorsForChart[chartId];
|
return cachedNativeIndicatorsForChart[chartId];
|
||||||
}
|
}
|
||||||
@ -326,14 +326,11 @@ export const selectNativeIndicatorsForChart = (
|
|||||||
}
|
}
|
||||||
const indicators = crossFilterIndicators.concat(nativeFilterIndicators);
|
const indicators = crossFilterIndicators.concat(nativeFilterIndicators);
|
||||||
cachedNativeIndicatorsForChart[chartId] = indicators;
|
cachedNativeIndicatorsForChart[chartId] = indicators;
|
||||||
cachedNativeFilterDataForChart = {
|
cachedNativeFilterDataForChart[chartId] = {
|
||||||
...cachedNativeFilterDataForChart,
|
|
||||||
nativeFilters,
|
nativeFilters,
|
||||||
dashboardLayout,
|
dashboardLayout,
|
||||||
chartConfiguration,
|
chartConfiguration,
|
||||||
dataMask,
|
dataMask,
|
||||||
};
|
|
||||||
cachedNativeFilterDataForChart[chartId] = {
|
|
||||||
appliedColumns,
|
appliedColumns,
|
||||||
rejectedColumns,
|
rejectedColumns,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user