Closed julienw closed 6 years ago
Hi, julienw
The secondaryInitialSize
prop, as its name suggests, sets the initial size of secondary panel.
For what you would like to accomplish (hiding the secondary panel), you can choose not to render that component. Please see this example for more detail: https://github.com/zesik/react-splitter-layout/blob/3.0.0/example/javascripts/components/TogglableSidebarLayout.jsx
That's what I did. I was just surprised about the behavior, so maybe it should be more documented.
Thanks for the suggestion! I'll consider including that into the document.
I try to conditionally use the splitter component: in some cases I don't want to display the secondary pane.
To do this, I set
secondaryInitialSize
to 0. This doesn't work if I set it to0
and in a subsequent render set it to something else (like25
). For a reason I don't completely get yet, it works in the opposite direction.