From b226ab174bfadd4d0a56bf073e8670db1f8a5311 Mon Sep 17 00:00:00 2001 From: kkk000111999 <254467556@qq.com> Date: Sat, 27 Jun 2026 12:15:40 +0800 Subject: [PATCH] feat(data-grid): bulk-edit empty input sets selected cells to NULL In the 'Bulk Edit Selection' dialog, submitting with an empty input now sets every selected editable cell to SQL NULL instead of an empty string, matching the field's 'Value, or NULL' placeholder. fillSelectionWithValue() accepts string | null so null flows through to applyCellValue(). Co-authored-by: kkk000111999 --- apps/desktop/src/components/grid/DataGrid.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index 53723393db..e4f50485bd 100644 --- a/apps/desktop/src/components/grid/DataGrid.vue +++ b/apps/desktop/src/components/grid/DataGrid.vue @@ -4944,7 +4944,7 @@ function applyVisibleCellValue(item: RowItem, visibleCol: number, value: string return true; } -function fillSelectionWithValue(value: string): boolean { +function fillSelectionWithValue(value: string | null): boolean { const range = selectedRange.value; let applied = false; if (range) { @@ -5003,7 +5003,9 @@ function openBulkEditDialog() { } function applyBulkEditValue() { - if (!fillSelectionWithValue(bulkEditValue.value)) return; + // Empty input sets the selected cells to SQL NULL (the placeholder hints "Value, or NULL"). + const value = bulkEditValue.value === "" ? null : bulkEditValue.value; + if (!fillSelectionWithValue(value)) return; bulkEditDialogOpen.value = false; }