dosubot[bot] commented on issue #37393: URL: https://github.com/apache/superset/issues/37393#issuecomment-3789143062
<!-- Answer --> In Superset 6.0.0, the "Clear All" and "Apply" actions for filters are intentionally separated: clearing filters only resets values in the UI, and you must click "Apply" to update visuals and charts. This affects dependent filters as well—if you want "Clear All" to immediately apply changes and reset visuals, you can modify the handleClearAll function in the FilterBar component to dispatch updateDataMask for each cleared filter, similar to how handleApply works. This workaround has resolved similar issues for other users and matches the current codebase pattern. See an example implementation and discussion here: [GitHub issue comment](https://github.com/apache/superset/issues/37069#issuecomment-3741966730). There are also some known edge cases: if you use a custom dashboard theme, filters may not apply due to theme context propagation bugs—using a global/system theme avoids this ([details](https://github.com/apache/superset/issues/35131)). Also, clearing all filters can set required time filters to "No filter", causing backend errors; the expected behavior would be to reset required filters to their default values, but this is not currently implemented ([discussion](https://github.com/apache/superset/issues/33361#issuecomment-2879083501)). There is no built-in setting to make child filters automatically reset when a parent filter changes; this would require custom development. Options like enableEmptyFilter and defaultToFirstItem do not force this behavior ([reference](https://github.com/apache/superset/discussions/35245)). If you need step-by-step guidance on customizing handleClearAll or editing filter configuration for your use case, let me know! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/bc25026f-0657-4866-879c-1f46561b06d3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/bc25026f-0657-4866-879c-1f46561b06d3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/bc25026f-0657-4866-879c-1f46561b06d3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/bc25026f-0657-4866-879c-1f46561b06d3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/bc25026f-0657-4866-879c-1f46561b06d3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/bc25026f-0657-4866-879c-1f46561b06d3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/bc25026f-0657-4866-879c-1f46561b06d3?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=In%20Superset%206.0.0%2C%20the%20%22Clear%20All%22%20and%20%22Apply%22%20actions%20for%20filters%20are%20intentionally%20separated%3A%20clearing%20filters%20only%20resets%20values%20in%20the%20UI%2C%20and%20you%20must%20click%20%22Apply%22%20to%20update%20visuals%20and%20charts.%20This%20affects%20dependent%20filters%20as%20well%E2%80%94if%20you%20want%20%22Clear%20All%22%20to%20immediately%20apply%20changes%20and%20reset%20visuals%2C%20you%20can%20modify%20the%20handleClearAll%20function%20in%20the%20FilterBar%20component%20to%20dispatch%20updateDataMask%20for%20each%20cleared%20filter%2C%20similar%20to%20how%20handleApply%20works.%20This%20workaround%20has%20resolved%20similar%20issues%20for%20other%20users%20and%20matches%20the%20current%20codeb ase%20pattern.%20See%20an%20example%20implementation%20and%20discussion%20here%3A%20%5BGitHub%20issue%20comment%5D%28https%3A//github.com/apache/superset/issues/37069%23issuecomment-3741966730%29.%0A%0AThere%20are%20also%20some%20known%20edge%20cases%3A%20if%20you%20use%20a%20custom%20dashboard%20theme%2C%20filters%20may%20not%20apply%20due%20to%20theme%20context%20propagation%20bugs%E2%80%94using%20a%20global/system%20theme%20avoids%20this%20%28%5Bdetails%5D%28https%3A//github.com/apache/superset/issues/35131%29%29.%20Also%2C%20clearing%20all%20filters%20can%20set%20required%20time%20filters%20to%20%22No%20filter%22%2C%20causing%20backend%20errors%3B%20the%20expected%20behavior%20would%20be%20to%20reset%20required%20filters%20to%20their%20default%20values%2C%20but%20this%20is%20not%20currently%20implemented%20%28%5Bdiscussion%5D%28https%3A//github.com/apache/superset/issues/33361%23issuecomment-2879083501%29%29.%0A%0AThere%20is%20no%20built-in%20setting%20to%20make%20child%20filter s%20automatically%20reset%20when%20a%20parent%20filter%20changes%3B%20this%20would%20require%20custom%20development.%20Options%20like%20enableEmptyFilter%20and%20defaultToFirstItem%20do%20not%20force%20this%20behavior%20%28%5Breference%5D%28https%3A//github.com/apache/superset/discussions/35245%29%29.%20%0A%0AIf%20you%20need%20step-by-step%20guidance%20on%20customizing%20handleClearAll%20or%20editing%20filter%20configuration%20for%20your%20use%20case%2C%20let%20me%20know%21) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37393) -- 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]
