fix(mongo): refresh JSON viewer after document edit

The right-side JSON viewer was not updating after saving edits because
editJson was stale — only load() was called, which updates the document
list but not the displayed JSON preview.
This commit is contained in:
t8y2
2026-05-13 19:08:22 +08:00
parent 1937ee9fd3
commit 2f4c50dc1e
+3
View File
@@ -333,6 +333,9 @@ async function saveDoc() {
isNew.value = false;
editFields.value = [];
await load();
if (selectedIdx.value !== null && documents.value[selectedIdx.value]) {
editJson.value = JSON.stringify(documents.value[selectedIdx.value], null, 2);
}
} catch (e: unknown) {
error.value = String(e);
}