Commit 93195fac by Peter Holmberg Committed by GitHub

Fix: Reimplement HideFromTabs in Tabs component (#21863)

* reimplement hidefromtabs

* remove console log

* going with option b instead

* less explicit
parent c140d110
...@@ -60,6 +60,7 @@ const Navigation = ({ main }: { main: NavModelItem }) => { ...@@ -60,6 +60,7 @@ const Navigation = ({ main }: { main: NavModelItem }) => {
<TabsBar className="page-header__tabs" hideBorder={true}> <TabsBar className="page-header__tabs" hideBorder={true}>
{main.children.map((child, index) => { {main.children.map((child, index) => {
return ( return (
!child.hideFromTabs && (
<Tab <Tab
label={child.text} label={child.text}
active={child.active} active={child.active}
...@@ -67,6 +68,7 @@ const Navigation = ({ main }: { main: NavModelItem }) => { ...@@ -67,6 +68,7 @@ const Navigation = ({ main }: { main: NavModelItem }) => {
icon={child.icon} icon={child.icon}
onChangeTab={() => goToUrl(index)} onChangeTab={() => goToUrl(index)}
/> />
)
); );
})} })}
</TabsBar> </TabsBar>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment