dosubot[bot] commented on issue #37056: URL: https://github.com/apache/superset/issues/37056#issuecomment-3737494050
<!-- Answer --> This is a real bug in the current filter scoping logic for dashboards with tabs and sub-tabs. The code that determines whether a filter is "in scope" checks if any tab in the filter's configured scope (rootPath) is active, but it doesn't distinguish between parent tabs and nested sub-tabs. As a result, a filter scoped to a sub-tab can remain visible as long as its parent tab is active, even if the sub-tab itself is not selected. This explains why filters like "Annee" are not hidden as expected when navigating sub-tabs ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/nativeFilters/state.ts#L80-L158)). There are currently no configuration options or workarounds in the UI to fully resolve this. Improving the logic to require all relevant tabs in the hierarchy (including sub-tabs) to be active for a filter to be in scope would address the issue. If you need a workaround, you might try restructuring your dashboard to avoid nested tabs for now, but a code fix will be needed for full support. <!-- 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/3034ca2c-3b54-4fbc-8bd0-0704fba15cdb?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3034ca2c-3b54-4fbc-8bd0-0704fba15cdb?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3034ca2c-3b54-4fbc-8bd0-0704fba15cdb?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3034ca2c-3b54-4fbc-8bd0-0704fba15cdb?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3034ca2c-3b54-4fbc-8bd0-0704fba15cdb?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3034ca2c-3b54-4fbc-8bd0-0704fba15cdb?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3034ca2c-3b54-4fbc-8bd0-0704fba15cdb?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=This%20is%20a%20real%20bug%20in%20the%20current%20filter%20scoping%20logic%20for%20dashboards%20with%20tabs%20and%20sub-tabs.%20The%20code%20that%20determines%20whether%20a%20filter%20is%20%22in%20scope%22%20checks%20if%20any%20tab%20in%20the%20filter%27s%20configured%20scope%20%28rootPath%29%20is%20active%2C%20but%20it%20doesn%27t%20distinguish%20between%20parent%20tabs%20and%20nested%20sub-tabs.%20As%20a%20result%2C%20a%20filter%20scoped%20to%20a%20sub-tab%20can%20remain%20visible%20as%20long%20as%20its%20parent%20tab%20is%20active%2C%20even%20if%20the%20sub-tab%20itself%20is%20not%20selected.%20This%20explains%20why%20filters%20like%20%22Annee%22%20are%20not%20hidden%20as%20expected%20when%20navigating%20sub-tabs%C2%A0%28%5Bsource%5D%28https%3A/ /github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/nativeFilters/state.ts%23L80-L158%29%29.%0A%0AThere%20are%20currently%20no%20configuration%20options%20or%20workarounds%20in%20the%20UI%20to%20fully%20resolve%20this.%20Improving%20the%20logic%20to%20require%20all%20relevant%20tabs%20in%20the%20hierarchy%20%28including%20sub-tabs%29%20to%20be%20active%20for%20a%20filter%20to%20be%20in%20scope%20would%20address%20the%20issue.%20If%20you%20need%20a%20workaround%2C%20you%20might%20try%20restructuring%20your%20dashboard%20to%20avoid%20nested%20tabs%20for%20now%2C%20but%20a%20code%20fix%20will%20be%20needed%20for%20full%20support.) [](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/37056) -- 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]
