justinpark commented on code in PR #45495:
URL: https://github.com/apache/superset/pull/45495#discussion_r4385365242
##########
superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.tsx:
##########
@@ -130,20 +130,16 @@ const Tabs = (props: TabsProps): ReactElement => {
);
const { tabIndex: initTabIndex, activeKey: initActiveKey } = useMemo(() => {
- let tabIndex = Math.max(
- 0,
- findTabIndexByComponentId({
- currentComponent: props.component,
- directPathToChild,
- }),
- );
- if (tabIndex === 0 && activeTabs?.length) {
- props.component.children.forEach((tabId, index) => {
- if (tabIndex === 0 && activeTabs?.includes(tabId)) {
- tabIndex = index;
- }
- });
+ let tabIndex = findTabIndexByComponentId({
+ currentComponent: props.component,
+ directPathToChild,
+ });
+ if (tabIndex === -1) {
Review Comment:
a deep-link selection now replaces the sibling tab seeded from `active_tabs`
(passed as the previous tab id), so only one tab per TABS stays active.
--
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]