gabotorresruiz commented on code in PR #37260:
URL: https://github.com/apache/superset/pull/37260#discussion_r2742854078


##########
superset-frontend/src/dashboard/components/nativeFilters/selectors.ts:
##########
@@ -281,8 +285,19 @@ const getStatus = ({
   }
   if (column && rejectedColumns?.has(column))
     return IndicatorStatus.Incompatible;
-  if (column && appliedColumns?.has(column) && hasValue) {
-    return APPLIED_STATUS;
+  // If filter has a value and column is not rejected, show as applied
+  // This works even when chart hasn't loaded yet (appliedColumns is empty)
+  // The dataMask state is the source of truth for filter application
+  if (column && hasValue && !rejectedColumns?.has(column)) {
+    // If chart has loaded and confirmed this column was applied, use that
+    if (appliedColumns?.has(column)) {
+      return APPLIED_STATUS;
+    }
+    // If chart hasn't loaded yet but we have a value, assume it's applied
+    // This allows showing filter indicators before query response is available
+    if (!appliedColumns || appliedColumns.size === 0) {

Review Comment:
   Thanks for the detailed explanation and the debug logs! I think this make 
sense, this looks solid! Thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to