Skip to content

Conversation

msyavuz
Copy link
Member

@msyavuz msyavuz commented Sep 26, 2025

SUMMARY

This PR fixes an issue where the "Clear All" button in the filter bar doesn't properly clear dependent filters when they have required parent filters.

The main changes:

  1. FilterBar: Changed to iterate over all native filters instead of just those in scope, ensuring dependent filters are cleared even if their parent was cleared first
  2. SelectFilterPlugin: Added logic to skip applying default values when the clearAllTrigger is active, preventing filters from immediately reverting to their default values during a Clear All operation

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: When clicking "Clear All", dependent filters with required parents would not be cleared properly, remaining in their previous state or reverting to default values.

After: All filters, including dependent ones, are properly cleared when clicking "Clear All".

TESTING INSTRUCTIONS

  1. Create a dashboard with native filters that have parent-child dependencies
  2. Set up a child filter that requires a parent filter selection
  3. Configure the child filter with "Default to first item" enabled
  4. Select values in both parent and child filters
  5. Click the "Clear All" button
  6. Verify that both parent and child filters are cleared and don't revert to default values

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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

@dosubot dosubot bot added change:frontend Requires changing the frontend dashboard:native-filters Related to the native filters of the Dashboard labels Sep 26, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've completed my review and didn't find any issues.

Files scanned
File Path Reviewed
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:frontend Requires changing the frontend dashboard:native-filters Related to the native filters of the Dashboard size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant