Bug description
When editing a filter and selecting a dataset, the frontend filter does not take effect, but the interface is returned correctly and the frontend is not rendered correctly.
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.9
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.
Comment From: dosubot[bot]
Based on recent changes and the current implementation, when you edit a filter and select a dataset, the frontend determines which charts the filter applies to by matching the selected dataset ID with each chart's dataset. If the dataset IDs don't match, the filter won't affect those charts, and they may be excluded from the filter's scope in the UI. This logic is handled in the filter configuration modal and form components, specifically in how initiallyExcludedCharts is computed and how the DatasetSelect component updates the filter state. Any mismatch or failure to propagate the new dataset ID can cause the filter not to take effect visually, even if the backend responds correctly. Recent PRs have touched related logic, such as dependency arrays and sorting, but no direct fix for this specific issue has been merged yet (example).
If you haven't already, check for any errors in the browser console when this happens, as a JavaScript error or state update issue could prevent the UI from rendering the filter effect. Also, ensure that the dataset selection is correctly updating the filter's dataset ID and that the charts you expect to be filtered are using the same dataset.
If the issue persists, it may be worth reviewing the logic in FiltersConfigForm.tsx and related components to ensure state updates and dataset ID propagation are working as intended.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: sadpandajoe
@xianggao-1020 do you have exact steps you used and can you reproduced on examples? I have this ephemeral http://34.222.127.13:8080/superset/welcome/ (admin/admin) and I can't reproduce the issue.
Comment From: xianggao-1020
@sadpandajoe I'm sorry, I also can't reproduce the issue in this environment.