Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: table editor input (#45449)

Vaibhav783666a6000f
diff --git a/apps/studio/components/grid/SupabaseGrid.utils.ts b/apps/studio/components/grid/SupabaseGrid.utils.ts
index 1f4200f72fd..64f111efc33 100644
--- a/apps/studio/components/grid/SupabaseGrid.utils.ts
+++ b/apps/studio/components/grid/SupabaseGrid.utils.ts
@@ -289,10 +289,24 @@ export const handleCellKeyDown = <TRow extends SupaRow = SupaRow>(
const value = formatClipboardValue(cellValue)
copyToClipboard(value)
}
- // Let registered shortcuts win over rdg's "type a key to enter edit mode" default.
+
+ // Let registered shortcuts win over rdg's "type a key to enter edit mode" default,
+ // unless a printable key enters edit mode.
if (eventMatchesAnyShortcut(event.nativeEvent, tableEditorRegistry)) {
- event.preventGridDefault()
- return
+ if (
+ event.key.length === 1 &&
+ event.key !== ' ' &&
+ !event.altKey &&
+ !event.ctrlKey &&
+ !event.metaKey &&
+ !event.shiftKey &&
+ column.renderEditCell != null
+ ) {
+ event.stopPropagation()
+ } else {
+ event.preventGridDefault()
+ return
+ }
}
// Toggle boolean cells with T/F when no modifier keys are pressed.