Not sure what I'm missing here: looking at the example source code in both uncontrolled mode and controlled mode call a setState method on tab change (https://github.com/palantir/blueprint/blob/master/packages/core/examples/tabs2Example.tsx). However, in my environment, this call of setState in my onChange listener is re-rendering the component containing my Tabs2 element meaning that only 1 of my tab panels (specifically the one I'm looking at) are preserved.
Asked
Active
Viewed 195 times
1 Answers
1
I think you may be misunderstanding the purpose of the renderActiveTabPanelOnly
prop:
- when
true
, only the active tab is mounted in the DOM (the other non-active tabs are removed). - when
false
, all tabs are mounted in the DOM but only the active tab is visible (the non-active tabs are hidden via CSS).
Does that clarify the usage?

Gilad Gray
- 451
- 2
- 6
-
I think I made the mistake of using stateless components as panels, so each time the Tabs2 parent component was being rerendered, so were my stateless components, effectively making it so that only one of my panels was 'active' so to speak. If I had used stateful components for the panels, I think I would be fine. Thank you for clarification. – spakmad Jun 09 '17 at 18:49