fix(connection): clear parsed state when switching profiles
This commit is contained in:
3 files changed
+141
-5
No files matched your search
@@ -2770,6 +2770,10 @@ function defaultDatabaseForProfile() {
|
||||
}
|
||||
|
||||
function onDbTypeChange(val: string) {
|
||||
if (!editingId.value && val === selectedType.value) return;
|
||||
if (!editingId.value) {
|
||||
resetForm({ preservePickerState: true });
|
||||
}
|
||||
const category = dbCategoryForOption(val);
|
||||
if (category) selectedDbCategory.value = category;
|
||||
customDriverName.value = "";
|
||||
@@ -4848,7 +4852,7 @@ function openJdbcDriverManagerFromError() {
|
||||
openJdbcDriverManager();
|
||||
}
|
||||
|
||||
function resetForm() {
|
||||
function resetForm(options: { preservePickerState?: boolean } = {}) {
|
||||
editingId.value = null;
|
||||
form.value = defaultForm();
|
||||
resetConnectionNoteVisibilityDraft(connectionNoteVisibilityDraft, settingsStore.editorSettings.sidebarShowConnectionNotes);
|
||||
@@ -4870,10 +4874,12 @@ function resetForm() {
|
||||
appliedConnectionUrlInput.value = "";
|
||||
resetMeilisearchHostInput();
|
||||
oracleTnsAdminPath.value = "";
|
||||
dialogStep.value = "select";
|
||||
dbSearchQuery.value = "";
|
||||
selectedDbCategory.value = "sql";
|
||||
configTab.value = "connection";
|
||||
if (!options.preservePickerState) {
|
||||
dialogStep.value = "select";
|
||||
dbSearchQuery.value = "";
|
||||
selectedDbCategory.value = "sql";
|
||||
configTab.value = "connection";
|
||||
}
|
||||
resetVisibleDatabaseDraftState();
|
||||
resetVisibleNacosNamespaceDraftState();
|
||||
resetProductionDatabaseDraftState();
|
||||
|
||||
Reference in new issue
Block a user