diff --git a/svelte/src/datum-editor.svelte b/svelte/src/datum-editor.svelte
index a1c0037..4277a91 100644
--- a/svelte/src/datum-editor.svelte
+++ b/svelte/src/datum-editor.svelte
@@ -145,6 +145,17 @@ example within the `` or ``.
// Cancel edit before blurring, or else the table will try to commit it.
on_cancel_edit?.();
on_restore_focus?.();
+ } else if (ev.key === "Backspace") {
+ if (
+ editor_state &&
+ ["Dropdown", "Numeric", "Text", "Uuid"].includes(
+ current_presentation.t ?? "",
+ ) &&
+ editor_state.text_value === ""
+ ) {
+ editor_state.is_null = !editor_state.is_null;
+ handle_input();
+ }
} else if (
current_presentation.t === "Dropdown" &&
filtered_dropdown_options.length > 0
diff --git a/svelte/src/table-viewer.webc.svelte b/svelte/src/table-viewer.webc.svelte
index aa8825d..d3576cd 100644
--- a/svelte/src/table-viewer.webc.svelte
+++ b/svelte/src/table-viewer.webc.svelte
@@ -393,7 +393,7 @@
!ev.altKey &&
!ev.ctrlKey &&
!ev.metaKey &&
- /^[a-zA-Z0-9`~!@#$%^&*()_=+[\]{}\\|;:'",<.>/?-]$/.test(ev.key)
+ /^([a-zA-Z0-9`~!@#$%^&*()_=+[\]{}\\|;:'",<.>/?-]|Backspace)$/.test(ev.key)
) {
const sel = selections[0];
if (sel) {
@@ -401,6 +401,7 @@
lazy_data.fields[sel.coords.field_idx].field.presentation,
);
datum_editor?.focus();
+ try_sync_edit_to_cells();
}
} else if (ev.key === "Enter") {
if (ev.shiftKey) {