mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-09-25 09:03:43 +08:00
fix: unwanted rerender when connect a new database (#127)
* deleted unused code * fix: error when connect a new database * Update pnpm-lock.yaml * Update pnpm-lock.yaml
This commit is contained in:
@ -105,7 +105,7 @@ const ConnectionSidebar = () => {
|
|||||||
}, [selectedSchemaName, schemaList]);
|
}, [selectedSchemaName, schemaList]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (hasSchemaProperty && selectedSchemaName === "") {
|
if (hasSchemaProperty && selectedSchemaName === "" && schemaList.length > 0) {
|
||||||
conversationStore.updateSelectedSchemaName(head(schemaList)?.name || "");
|
conversationStore.updateSelectedSchemaName(head(schemaList)?.name || "");
|
||||||
}
|
}
|
||||||
}, [schemaList, currentConversation]);
|
}, [schemaList, currentConversation]);
|
||||||
|
Reference in New Issue
Block a user