Skip to content

Commit 67ae084

Browse files
committed
fix:bug
1 parent 56211a3 commit 67ae084

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • chat2db-client/src/components/ConsoleEditor/components/SelectBoundInfo

chat2db-client/src/components/ConsoleEditor/components/SelectBoundInfo/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 = () => {

0 commit comments

Comments
 (0)