@@ -15,7 +15,7 @@ import { NameGenerator } from "comps/utils";
1515import { ScrollBar , Section , sectionNames } from "lowcoder-design" ;
1616import { HintPlaceHolder } from "lowcoder-design" ;
1717import _ from "lodash" ;
18- import React , { useContext , useMemo } from "react" ;
18+ import React , { useContext , useMemo , useEffect } from "react" ;
1919import styled , { css } from "styled-components" ;
2020import { IContainer } from "../containerBase/iContainer" ;
2121import { SimpleContainerComp } from "../containerBase/simpleContainerComp" ;
@@ -266,6 +266,11 @@ const TabbedContainer = (props: TabbedContainerProps) => {
266266const selectedTab = visibleTabs . find ( ( tab ) => tab . key === props . selectedTabKey . value ) ;
267267const activeKey = selectedTab ?selectedTab . key :visibleTabs . length > 0 ?visibleTabs [ 0 ] . key :undefined ;
268268
269+ useEffect ( ( ) => {
270+ if ( activeKey && activeKey !== props . selectedTabKey . value ) {
271+ props . selectedTabKey . onChange ( activeKey ) ;
272+ }
273+ } , [ activeKey , props . selectedTabKey . value ] ) ;
269274
270275const editorState = useContext ( EditorContext ) ;
271276const maxWidth = editorState . getAppSettings ( ) . maxWidth ;