From 9c5b649b92ef2df478dcfe3894c943f9543aa84b Mon Sep 17 00:00:00 2001 From: Enrique Moreno Date: Wed, 14 May 2025 14:06:40 +0200 Subject: [PATCH 1/2] Fixed double closing tags in certain examples from documentation --- .../screens/components/chip/overview/examples/filter.ts | 2 +- .../paginator/overview/examples/flexibleConfiguration.ts | 2 +- .../components/paginator/overview/examples/scrollable.ts | 2 +- packages/lib/src/tabs/Tabs.tsx | 9 ++++++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/website/screens/components/chip/overview/examples/filter.ts b/apps/website/screens/components/chip/overview/examples/filter.ts index 8f080fc66..ff5d91fa8 100644 --- a/apps/website/screens/components/chip/overview/examples/filter.ts +++ b/apps/website/screens/components/chip/overview/examples/filter.ts @@ -13,7 +13,7 @@ const roles = ["Admin", "Security Analyst", "Auditor", "Read-Only User"]; }; return ( - > + { return ( - > + diff --git a/apps/website/screens/components/paginator/overview/examples/scrollable.ts b/apps/website/screens/components/paginator/overview/examples/scrollable.ts index 08adb37bf..1da4ef834 100644 --- a/apps/website/screens/components/paginator/overview/examples/scrollable.ts +++ b/apps/website/screens/components/paginator/overview/examples/scrollable.ts @@ -116,7 +116,7 @@ const code = `() => { ]; return ( - > + diff --git a/packages/lib/src/tabs/Tabs.tsx b/packages/lib/src/tabs/Tabs.tsx index 43a56a694..e6fc21b37 100644 --- a/packages/lib/src/tabs/Tabs.tsx +++ b/packages/lib/src/tabs/Tabs.tsx @@ -118,6 +118,7 @@ const DxcTabs = ({ return isValidElement(initialActiveTab) ? initialActiveTab.props.label : ""; }); + console.log("activeTabLabel", activeTabLabel); const [countClick, setCountClick] = useState(0); const [innerFocusIndex, setInnerFocusIndex] = useState(null); const [scrollLeftEnabled, setScrollLeftEnabled] = useState(false); @@ -244,9 +245,11 @@ const DxcTabs = ({ )} - {Children.map(children, (child) => - isValidElement(child) && child.props.label === activeTabLabel ? child.props.children : null - )} + { + // Children.map(children, (child) => + // isValidElement(child) && child.props.label === activeTabLabel ? child.props.children : null + // ) + } ) : ( tabs != null && ( From 2f7ce10800af0a85d6f82835134f8b4d60116cbc Mon Sep 17 00:00:00 2001 From: Enrique Moreno Date: Wed, 14 May 2025 14:08:38 +0200 Subject: [PATCH 2/2] Restored unwanted comments --- packages/lib/src/tabs/Tabs.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/lib/src/tabs/Tabs.tsx b/packages/lib/src/tabs/Tabs.tsx index e6fc21b37..43a56a694 100644 --- a/packages/lib/src/tabs/Tabs.tsx +++ b/packages/lib/src/tabs/Tabs.tsx @@ -118,7 +118,6 @@ const DxcTabs = ({ return isValidElement(initialActiveTab) ? initialActiveTab.props.label : ""; }); - console.log("activeTabLabel", activeTabLabel); const [countClick, setCountClick] = useState(0); const [innerFocusIndex, setInnerFocusIndex] = useState(null); const [scrollLeftEnabled, setScrollLeftEnabled] = useState(false); @@ -245,11 +244,9 @@ const DxcTabs = ({ )} - { - // Children.map(children, (child) => - // isValidElement(child) && child.props.label === activeTabLabel ? child.props.children : null - // ) - } + {Children.map(children, (child) => + isValidElement(child) && child.props.label === activeTabLabel ? child.props.children : null + )} ) : ( tabs != null && (