dosubot[bot] commented on issue #37772: URL: https://github.com/apache/superset/issues/37772#issuecomment-3862974580
<!-- Answer --> This is a frontend bug in the tab content visibility logic for the "View as table" modal in Mixed charts. The root cause is that the isVisible prop is only set to true for the first tab's table, so when you switch to the second tab, the first table remains visible. To fix this, update the logic in DataTablesPane/useResultsPane so that isVisible is true only for the pane whose tab key matches activeTabKey. Each SingleQueryResultPane should receive isVisible=true only when its specific tab is active. This will ensure only the selected table is shown when switching tabs. You can see the relevant code and explanation [here](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx#L88-L239). <!-- 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/c1b62294-d69b-4b71-902c-d1409b6be25a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c1b62294-d69b-4b71-902c-d1409b6be25a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c1b62294-d69b-4b71-902c-d1409b6be25a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c1b62294-d69b-4b71-902c-d1409b6be25a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c1b62294-d69b-4b71-902c-d1409b6be25a?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c1b62294-d69b-4b71-902c-d1409b6be25a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c1b62294-d69b-4b71-902c-d1409b6be25a?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%20frontend%20bug%20in%20the%20tab%20content%20visibility%20logic%20for%20the%20%22View%20as%20table%22%20modal%20in%20Mixed%20charts.%20The%20root%20cause%20is%20that%20the%20isVisible%20prop%20is%20only%20set%20to%20true%20for%20the%20first%20tab%27s%20table%2C%20so%20when%20you%20switch%20to%20the%20second%20tab%2C%20the%20first%20table%20remains%20visible.%20To%20fix%20this%2C%20update%20the%20logic%20in%20DataTablesPane/useResultsPane%20so%20that%20isVisible%20is%20true%20only%20for%20the%20pane%20whose%20tab%20key%20matches%20activeTabKey.%20Each%20SingleQueryResultPane%20should%20receive%20isVisible%3Dtrue%20only%20when%20its%20specific%20tab%20is%20active.%20This%20will%20ensure%20only%20the%20selected%20table%20is%20shown%20wh en%20switching%20tabs.%20You%20can%20see%20the%20relevant%20code%20and%20explanation%20%5Bhere%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx%23L88-L239%29.) [](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/37772) -- 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]
