fix(mongodb): preserve null fields in grid edits

Closes #5773
This commit is contained in:
t8y2 committed 2026-08-10 16:13:49 +08:00
1 parent 5fe3b5b435
commit 20ddf2eca5
2 files changed
+21

No files matched your search

@@ -74,6 +74,7 @@ export function parseMongoDocumentInputValue(raw: MongoInputValue): unknown {
}
export function mongoDocumentDisplayValue(value: unknown): unknown {
if (value === null) return "NULL";
if (value && typeof value === "object" && !Array.isArray(value)) {
const object = value as Record<string, unknown>;
if (Object.keys(object).length === 1 && typeof object.$numberLong === "string") return `NumberLong(${JSON.stringify(object.$numberLong)})`;