From 43deb9b17fc26594ca21a1d30a66858ff4260cbe Mon Sep 17 00:00:00 2001 From: arielsrodriguez Date: Fri, 7 Nov 2025 17:13:28 -0300 Subject: [PATCH] fix: add validation tab hidden and change validation value single select --- src/components/Form/SingleSelect.tsx | 2 +- src/components/Tabs/TabGroup.tsx | 5 +++-- src/components/TopPage/TopPage.tsx | 22 ++++++++++++---------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/components/Form/SingleSelect.tsx b/src/components/Form/SingleSelect.tsx index 695715c69..abe5cbcf9 100644 --- a/src/components/Form/SingleSelect.tsx +++ b/src/components/Form/SingleSelect.tsx @@ -128,7 +128,7 @@ function SingleSelect({ })) const getInputLabel = () => { - if (!isFilter && !selectedOption) return placeholder || label || '' + if (!isFilter && !selectedOption) return '' if (!selectedOption) return placeholder || label || '' return selectedOption.label || selectedOption.value.toString() diff --git a/src/components/Tabs/TabGroup.tsx b/src/components/Tabs/TabGroup.tsx index 4bfa17e17..791c6df9e 100644 --- a/src/components/Tabs/TabGroup.tsx +++ b/src/components/Tabs/TabGroup.tsx @@ -120,7 +120,6 @@ function TabGroup({ }, [orientation, variant, refContainer, dashRect] ) - const onClick = useCallback( (event: MouseEvent) => { const nodes = Array.prototype.slice.call(refContainer.current?.children) @@ -156,6 +155,7 @@ function TabGroup({ ...child.props }) } + if ((child as React.ReactElement)?.props?.hidden) return null return child }) }, [ @@ -172,8 +172,9 @@ function TabGroup({ ]) useEffect(() => { + if ((children as React.ReactElement)?.props?.hidden) return handleChangeIndicator(value) - }, [orientation, variant, wideLine, value]) + }, [orientation, variant, wideLine, value, children]) return (
{tabs ? ( - - {tabs.items.map((tab, index) => ( -