apache / apache/superset

Dependent child filter selection is not cleared/reset when parent filter value changes

Open
#44,008 2 comments 0 reactions 0 assignees View on GitHub
#bug
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 5h
Merged PRs (30d)
685

Description

### Bug description

When using cascading (dependent) native filters on a dashboard, changing the selected value of a parent filter successfully updates the available dropdown options of the child filter, but does not clear or reset the active/visual selection of the child filter.

This leaves the child filter showing a stale, invalid value that does not belong to the new parent's option set. Consequently, the dashboard attempts to run queries with an impossible combination of filters (e.g., Country = UK and City = New York), causing all charts to turn blank.

To Reproduce:
1. Create a dataset containing a parent-to-child mapping (e.g., Country and City columns):
* USA → New York, Los Angeles
* UK → London, Manchester
2. Add two Native Filters to a dashboard:
* Filter 1 (Parent): Country
* Filter 2 (Child): City (configured with the setting: “Values are dependent on other filters” and set Country as the parent filter).
3. On the dashboard, select USA in the Country filter.
4. In the City filter, select New York. (Dashboard charts load correctly).
5. Change the Country filter to UK.
6. Observe the City filter.

Expected Behaviour:
When the Country filter changes to UK, the City filter's active selection (New York) should automatically clear or reset (or fallback to a default option if configured), because New York is not a valid option under UK.

Actual Behaviour:
The City filter continues to visually show and send New York as an active filter value, even though New York is no longer in the list of available dropdown options for UK.

### Screenshots/recordings

_No response_

### Superset version

6.0.0

### Python version

3.11

### Node version

16

### Browser

Chrome

### Additional context

_No response_

### Checklist

- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Contributor guide

Open the contributing guide

Research direction

Reproduce the dependent native-filter sequence in a dashboard: select a child value, change its parent, and observe the child selection and resulting query. Trace the dashboard native-filter entry point and existing dependent-filter tests; done means the child selection clears, resets, or uses its configured default, and no invalid parent/child query is sent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.