gabotorresruiz opened a new pull request, #37681:
URL: https://github.com/apache/superset/pull/37681

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   The "Clear all" button clears ALL native filters (including out-of-scope 
filters on inactive tabs), but the Apply validation only checks IN-SCOPE 
filters. This creates a validation gap where required out-of-scope filters can 
be left empty, causing:
   1. Dashboard errors when requiredFirst filters are empty
   2. Security issue: Charts showing unfiltered data when required filters are 
empty
   
   So this PR adds an optional `allFilters` parameter to `checkIsApplyDisabled` 
to validate required values across ALL filters, not just in-scope ones. Now the 
`Apply` button is disabled when any required filter (even on inactive tabs) is 
empty after `Clear all`.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   #### Before:
   
[fix-dashboard-filters-before.webm](https://github.com/user-attachments/assets/97980fae-e4ff-41ce-9334-d69de5bc82e6)
   
   #### After:
   
[fix-dashboard-filters-after.webm](https://github.com/user-attachments/assets/a6035369-f064-4ac5-8739-694751d77745)
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   1. Create a dashboard with 2 tabs (Tab A, Tab B), each with a chart
   2. Create Filter A: required (Filter value is required), scoped to Tab A only
   3. Create Filter B: required (Filter value is required), scoped to Tab B only
   4. Save and refresh, both filters should have default values
   5. Click "Apply" to establish baseline
   6. Stay on Tab A, click "Clear All"
   7. Select a value for Filter A only
   8. Verify: Apply button should be DISABLED (because Filter B is required but 
empty)
   9. Navigate to Tab B, select a value for Filter B
   10. Verify: Apply button should now be ENABLED


-- 
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