fix(grid): treat bulk-edit NULL keyword as SQL NULL
This commit is contained in:
1 parent
7ade5d2b6e
commit
69b43cf401
4 files changed
+84
-5
No files matched your search
@@ -12,3 +12,15 @@ export function dataGridInlineBulkEditValue(event: DataGridInlineBulkEditKeyEven
|
||||
if (event.key === "Enter") return "";
|
||||
return event.key !== "Process" && Array.from(event.key).length === 1 ? event.key : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bulk-edit dialog contract (placeholder "Value, or NULL"): empty input and the
|
||||
* bare keyword `NULL` stage SQL NULL. Every other input is kept as typed so a
|
||||
* text column can still receive the literal word via quoted/user-specific input
|
||||
* outside this dialog path.
|
||||
*/
|
||||
export function bulkEditInputToSqlValue(input: string): string | null {
|
||||
const trimmed = input.trim();
|
||||
if (trimmed === "" || trimmed.toUpperCase() === "NULL") return null;
|
||||
return input;
|
||||
}
|
||||
Reference in new issue
Block a user