dosubot[bot] commented on issue #36876: URL: https://github.com/apache/superset/issues/36876#issuecomment-3701517422
<!-- Answer --> The current behavior of Native Filters in Superset—where "Clear All" only resets the filter UI and requires a separate "Apply" click to update the dashboard—is intentional and matches the code implementation. The "Clear All" and "Apply" actions are handled separately, and there is no built-in setting or flag to make "Clear All" automatically apply the cleared filters or update the dashboard data immediately. To change this, the code in the filter bar would need to be modified so that "Clear All" also triggers the apply logic after clearing the filters. For reference, see the relevant code in the frontend: ["ActionButtons"](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx#L35-L162) and ["FilterBar"](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx#L8 0-L305). If you want "Clear All" to immediately update the dashboard, you would need to update the `handleClearAll` function to also call the apply logic (`handleApply`) after clearing the filters. There is currently no configuration option to enable this behavior. <!-- 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/5190b36c-8b09-46da-990b-4dcbaf61863d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5190b36c-8b09-46da-990b-4dcbaf61863d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5190b36c-8b09-46da-990b-4dcbaf61863d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5190b36c-8b09-46da-990b-4dcbaf61863d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5190b36c-8b09-46da-990b-4dcbaf61863d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5190b36c-8b09-46da-990b-4dcbaf61863d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5190b36c-8b09-46da-990b-4dcbaf61863d?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=The%20current%20behavior%20of%20Native%20Filters%20in%20Superset%E2%80%94where%20%22Clear%20All%22%20only%20resets%20the%20filter%20UI%20and%20requires%20a%20separate%20%22Apply%22%20click%20to%20update%20the%20dashboard%E2%80%94is%20intentional%20and%20matches%20the%20code%20implementation.%20The%20%22Clear%20All%22%20and%20%22Apply%22%20actions%20are%20handled%20separately%2C%20and%20there%20is%20no%20built-in%20setting%20or%20flag%20to%20make%20%22Clear%20All%22%20automatically%20apply%20the%20cleared%20filters%20or%20update%20the%20dashboard%20data%20immediately.%20To%20change%20this%2C%20the%20code%20in%20the%20filter%20bar%20would%20need%20to%20be%20modified%20so%20that%20%22Clear%20All%22%20also%20triggers%20the%20apply%20logic%20after%20cle aring%20the%20filters.%20For%20reference%2C%20see%20the%20relevant%20code%20in%20the%20frontend%3A%20%5B%22ActionButtons%22%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx%23L35-L162%29%20and%20%5B%22FilterBar%22%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx%23L80-L305%29.%0A%0AIf%20you%20want%20%22Clear%20All%22%20to%20immediately%20update%20the%20dashboard%2C%20you%20would%20need%20to%20update%20the%20%60handleClearAll%60%20function%20to%20also%20call%20the%20apply%20logic%20%28%60handleApply%60%29%20after%20clearing%20the%20filters.%20There%20is%20currently%20no%20configuration%20option%20to%20enable%20this%20behavior.) [](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/36876) -- 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]
