mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-08-02 14:01:59 +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]);
|
||||
|
||||
useEffect(() => {
|
||||
if (hasSchemaProperty && selectedSchemaName === "") {
|
||||
if (hasSchemaProperty && selectedSchemaName === "" && schemaList.length > 0) {
|
||||
conversationStore.updateSelectedSchemaName(head(schemaList)?.name || "");
|
||||
}
|
||||
}, [schemaList, currentConversation]);
|
||||
|
Reference in New Issue
Block a user