Page component isManagedSidebar

So here’s the thing, I have a sidebar component and a header component that respectively return those:

<PageSidebar nav={PageNavEN}/>
<PageHeader logo={HeaderLogo} toolbar={PageToolbar} showNavToggle/>

I also have a router component that works this way:

const HeaderNav = <Header keycloak={this.props.keycloak}/>;
const Sidebar = <SideNav/>;
<Route exact path="/home" render={() => <HomePage header={HeaderNav} sidebar={Sidebar}/>}/>

And every single page have this pattern in the return statement:

<Page header={this.props.header} sidebar={this.props.sidebar} isManagedSidebar>

The isManagedSidebar, if true, should manage the sidebar open/close state in my website, but it does not. I suppose it’s because my header and my sidebar are in 2 separate components, how can I make this work?

Thanks !

Hi Dave,

I believe we’ve had problems with isManagedSidebar in the past, try using showNavToggle, isNavOpen, and onNavToggle instead according to our example here: http://patternfly-react.surge.sh/patternfly-4/components/page/

Thanks!
Jessie

Hi Dave, the Page component is currently assuming that the component passed into header is directly the PatternFly PageHeader component instead of a component that wraps it, and the same goes for the sidebar. I’ve created an issue for this and expect to have a fix out soon. Thank you!

1 Like

Thanks !