@@ -61,6 +61,7 @@ const childrenMap = {
61
61
onEvent : eventHandlerControl ( EVENT_OPTIONS ) ,
62
62
disabled : BoolCodeControl ,
63
63
showHeader : withDefault ( BoolControl , true ) ,
64
+ destroyInactiveTab : withDefault ( BoolControl , false ) ,
64
65
style : styleControl ( TabContainerStyle , 'style' ) ,
65
66
headerStyle : styleControl ( ContainerHeaderStyle , 'headerStyle' ) ,
66
67
bodyStyle : styleControl ( TabBodyStyle , 'bodyStyle' ) ,
@@ -196,6 +197,7 @@ const TabbedContainer = (props: TabbedContainerProps) => {
196
197
headerStyle,
197
198
bodyStyle,
198
199
horizontalGridCells,
200
+ destroyInactiveTab,
199
201
} = props ;
200
202
201
203
const visibleTabs = tabs . filter ( ( tab ) => ! tab . hidden ) ;
@@ -242,7 +244,8 @@ const TabbedContainer = (props: TabbedContainerProps) => {
242
244
return {
243
245
label,
244
246
key : tab . key ,
245
- forceRender : true ,
247
+ forceRender : ! destroyInactiveTab ,
248
+ destroyInactiveTabPane : destroyInactiveTab ,
246
249
children : (
247
250
< BackgroundColorContext . Provider value = { bodyStyle . background } >
248
251
< ScrollBar style = { { height : props . autoHeight ? "auto" : "100%" , margin : "0px" , padding : "0px" } } hideScrollbar = { ! props . showVerticalScrollbar } overflow = { props . autoHeight ? 'hidden' :'scroll' } >
@@ -315,8 +318,9 @@ export const TabbedContainerBaseComp = (function () {
315
318
< Section name = { sectionNames . interaction } >
316
319
{ children . onEvent . getPropertyView ( ) }
317
320
{ disabledPropertyView ( children ) }
318
- { children . showHeader . propertyView ( { label : trans ( "tabbedContainer.showTabs" ) } ) }
319
321
{ hiddenPropertyView ( children ) }
322
+ { children . showHeader . propertyView ( { label : trans ( "tabbedContainer.showTabs" ) } ) }
323
+ { children . destroyInactiveTab . propertyView ( { label : trans ( "tabbedContainer.destroyInactiveTab" ) } ) }
320
324
</ Section >
321
325
) }
322
326
0 commit comments