File tree Expand file tree Collapse file tree
chat2db-client/src/components/ConsoleEditor/components/SelectBoundInfo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ const SelectBoundInfo = memo((props: IProps) => {
7878 setSchemaList ( [ ] ) ;
7979 getSchemaList ( ) ;
8080 }
81- } , [ boundInfo . dataSourceId ] ) ;
81+ } , [ boundInfo . dataSourceId , isActive ] ) ;
8282
8383 // 当数据库名变化时,重新获取schema列表
8484 useEffect ( ( ) => {
@@ -91,7 +91,7 @@ const SelectBoundInfo = memo((props: IProps) => {
9191 if ( ! supportSchema && boundInfo . databaseName ) {
9292 getAllTableNameList ( boundInfo . dataSourceId , boundInfo . databaseName ) ;
9393 }
94- } , [ boundInfo . databaseName ] ) ;
94+ } , [ boundInfo . databaseName , isActive ] ) ;
9595
9696 useEffect ( ( ) => {
9797 if ( ! isActive ) {
@@ -100,7 +100,7 @@ const SelectBoundInfo = memo((props: IProps) => {
100100 if ( supportSchema && boundInfo . schemaName ) {
101101 getAllTableNameList ( boundInfo . dataSourceId , boundInfo . databaseName , boundInfo . schemaName ) ;
102102 }
103- } , [ boundInfo . schemaName ] ) ;
103+ } , [ boundInfo . schemaName , isActive ] ) ;
104104
105105 // 获取数据库列表
106106 const getDatabaseList = ( ) => {
You can’t perform that action at this time.
0 commit comments