@@ -61,6 +61,7 @@ const childrenMap = {
6161 onEvent : eventHandlerControl ( EVENT_OPTIONS ) ,
6262 disabled : BoolCodeControl ,
6363 showHeader : withDefault ( BoolControl , true ) ,
64+ destroyInactiveTab : withDefault ( BoolControl , false ) ,
6465 style : styleControl ( TabContainerStyle , 'style' ) ,
6566 headerStyle : styleControl ( ContainerHeaderStyle , 'headerStyle' ) ,
6667 bodyStyle : styleControl ( TabBodyStyle , 'bodyStyle' ) ,
@@ -196,6 +197,7 @@ const TabbedContainer = (props: TabbedContainerProps) => {
196197 headerStyle,
197198 bodyStyle,
198199 horizontalGridCells,
200+ destroyInactiveTab,
199201 } = props ;
200202
201203 const visibleTabs = tabs . filter ( ( tab ) => ! tab . hidden ) ;
@@ -242,7 +244,8 @@ const TabbedContainer = (props: TabbedContainerProps) => {
242244 return {
243245 label,
244246 key : tab . key ,
245- forceRender : true ,
247+ forceRender : ! destroyInactiveTab ,
248+ destroyInactiveTabPane : destroyInactiveTab ,
246249 children : (
247250 < BackgroundColorContext . Provider value = { bodyStyle . background } >
248251 < 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 () {
315318 < Section name = { sectionNames . interaction } >
316319 { children . onEvent . getPropertyView ( ) }
317320 { disabledPropertyView ( children ) }
318- { children . showHeader . propertyView ( { label : trans ( "tabbedContainer.showTabs" ) } ) }
319321 { hiddenPropertyView ( children ) }
322+ { children . showHeader . propertyView ( { label : trans ( "tabbedContainer.showTabs" ) } ) }
323+ { children . destroyInactiveTab . propertyView ( { label : trans ( "tabbedContainer.destroyInactiveTab" ) } ) }
320324 </ Section >
321325 ) }
322326
0 commit comments