fix(alert-report-modal): enhance dashboard filters behavior and visibility
SUMMARY
Dashboard Filter Clear Fix
Problem:
When creating a report in the alerts modal with a multi-tab dashboard, selecting a dashboard filter and then clearing it with the X icon would not make the filter reappear in the available filters dropdown.
Root Cause:
The filter select's onClear handler was directly mutating state without calling setState, so React didn't detect the change.
The filter also remained in nativeFilterData with empty values, causing filterNativeFilterOptions() to continue excluding it from the dropdown.
Fix:
Properly update state with setNativeFilterData and reset nativeFilterId to null, which allows the filter to reappear in the available options while keeping the filter row visible.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
-
Before
-
After
-
Before
-
After
-
Before https://github.com/user-attachments/assets/55d4d4f6-44de-4093-aaea-f2d513f8065a
-
After https://github.com/user-attachments/assets/083a939c-6d9b-4ff1-9cbc-340dcb100c00
TESTING INSTRUCTIONS
- All tests should pass
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] 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
🎪 Showtime deployed environment on GHA for 65301d3
• Environment: http://44.252.24.85:8080 (admin/admin) • Lifetime: 48h auto-cleanup • Updates: New commits create fresh environments automatically
⚠️ DEPRECATED WORKFLOW ⚠️
@EnxDev This workflow is deprecated! Please use the new Superset Showtime system instead:
- Replace "testenv-up" label with "🎪 trigger-start"
- Better reliability and easier management
- See https://github.com/mistercrunch/superset-showtime for details
Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments
@EnxDev Ephemeral environment spinning up at http://35.94.20.69:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.
CodeAnt AI is reviewing your PR.
CodeAnt AI finished reviewing your PR.
There is an empty value that shows up when clearing. That should probably not be there
⚠️ DEPRECATED WORKFLOW ⚠️
@geido This workflow is deprecated! Please use the new Superset Showtime system instead:
- Replace "testenv-up" label with "🎪 trigger-start"
- Better reliability and easier management
- See https://github.com/mistercrunch/superset-showtime for details
Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments
@geido Ephemeral environment spinning up at http://52.26.63.207:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.
LGTM