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

   <!---
   fix(native-filters): preserve selected filter state
   -->
   
   ### SUMMARY
   The FilterBar previously removed selected filter state when the filter was 
missing from dataMaskApplied. This could clear the displayed selection even 
though the filter still existed in the dashboard configuration.
   
   The cleanup now removes state only when the filter no longer exists in the 
configured filters.
   
   A regression test was added to verify that a configured filter keeps its 
selected value after its applied data mask is removed.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   #### Before
   <img width="1917" height="1032" alt="32b676c6-969d-4316-8f08-051546781738" 
src="https://github.com/user-attachments/assets/c90da9b8-fab5-4d3e-993f-a82caeb210ba";
 />
   
   
   #### After
   <img width="1917" height="1032" alt="image" 
src="https://github.com/user-attachments/assets/c3703a1e-7bce-469c-b498-6effa9196a5c";
 />
   
   
   ### TESTING INSTRUCTIONS
   1. Open a dashboard containing a Native FilterBar with a filter such as 
Current Month.
   2. Verify that the filter displays its selected value.
   3. Change or clear the filter and verify that the dashboard filtering 
continues to work correctly.
   4. Return to the filter and verify that the selected value is displayed 
correctly instead of No filter.
   5. Refresh the dashboard and verify that the filter state remains correct.
   
   #### Automated test:
   
   npm test -- -t "FilterBar" 
src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx
   
   Result:
   
   Test Suites: 1 passed, 1 total
   Tests:       7 skipped, 22 passed, 29 total
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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