sea-chart 1.1.113 → 1.1.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,7 +46,14 @@ const DataFilter = _ref => {
|
|
|
46
46
|
let availableFilters = [];
|
|
47
47
|
// some of the filters of TABLE_ELEMENT maybe one of the hidden columns, so we need to filter them out
|
|
48
48
|
if (shown_column_keys && type === CHART_TYPE.TABLE_ELEMENT) {
|
|
49
|
-
availableFilters = validFilters === null || validFilters === void 0 ? void 0 : validFilters.filter(filter =>
|
|
49
|
+
availableFilters = validFilters === null || validFilters === void 0 ? void 0 : validFilters.filter(filter => {
|
|
50
|
+
// For filter groups, check if any sub-filter references shown columns
|
|
51
|
+
if (filter.filters) {
|
|
52
|
+
return filter.filters.some(subFilter => shown_column_keys.includes(subFilter.column_key));
|
|
53
|
+
}
|
|
54
|
+
// For regular filters, check directly
|
|
55
|
+
return shown_column_keys.includes(filter.column_key);
|
|
56
|
+
});
|
|
50
57
|
} else {
|
|
51
58
|
availableFilters = validFilters;
|
|
52
59
|
}
|