@ascentgl/ads-ui 21.56.0 → 21.57.0
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.
|
@@ -7822,10 +7822,19 @@ class AdsTableComponent {
|
|
|
7822
7822
|
// Column is filtered if:
|
|
7823
7823
|
// - No options are selected (empty array = all unchecked)
|
|
7824
7824
|
// - Some but not all options are selected
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7825
|
+
// - filterOptions is empty but we have stored values (data not loaded yet)
|
|
7826
|
+
const hasFilterOptions = config.filterOptions.length > 0;
|
|
7827
|
+
const isFiltered = values.length === 0 ||
|
|
7828
|
+
(hasFilterOptions && values.length < config.filterOptions.length) ||
|
|
7829
|
+
(!hasFilterOptions && values.length > 0);
|
|
7830
|
+
if (isFiltered && !filteredColumnsList.includes(field)) {
|
|
7831
|
+
filteredColumnsList.push(field);
|
|
7832
|
+
}
|
|
7833
|
+
}
|
|
7834
|
+
else if (values.length > 0) {
|
|
7835
|
+
// If no config but we have filter values, consider it filtered
|
|
7836
|
+
if (!filteredColumnsList.includes(field)) {
|
|
7837
|
+
filteredColumnsList.push(field);
|
|
7829
7838
|
}
|
|
7830
7839
|
}
|
|
7831
7840
|
}
|
|
@@ -8098,6 +8107,13 @@ class AdsTableComponent {
|
|
|
8098
8107
|
/** @ignore */
|
|
8099
8108
|
onFirstDataRendered(params) {
|
|
8100
8109
|
params.api.sizeColumnsToFit();
|
|
8110
|
+
// Re-evaluate filtering state now that data is available
|
|
8111
|
+
// This ensures filter button shows correct state when filters were applied before data loaded
|
|
8112
|
+
// Use setTimeout to avoid ExpressionChangedAfterItHasBeenCheckedError
|
|
8113
|
+
setTimeout(() => {
|
|
8114
|
+
this.updateFilteringState();
|
|
8115
|
+
this.cdr.detectChanges();
|
|
8116
|
+
});
|
|
8101
8117
|
}
|
|
8102
8118
|
/** @ignore */
|
|
8103
8119
|
getAgGridIcons() {
|