From ea4e9fceea057c38d43ee382ec80d8d39cc49ea3 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sat, 18 May 2024 16:56:32 +0800 Subject: [PATCH 1/2] fix(table): set onKeyDownCapture to undefined --- packages/components/table/src/use-table.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/components/table/src/use-table.ts b/packages/components/table/src/use-table.ts index 37f8ec445c..56f48b01d4 100644 --- a/packages/components/table/src/use-table.ts +++ b/packages/components/table/src/use-table.ts @@ -269,6 +269,9 @@ export function useTable(originalProps: UseTableProps) { }), props, ), + // avoid typeahead debounce wait for input / textarea + // so that typing with space won't be blocked + onKeyDownCapture: undefined, ref: domRef, className: slots.table({class: clsx(classNames?.table, props?.className)}), }), From cbd5e1715432e3049a7b892fdd8a5d3c51a2fd67 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sat, 18 May 2024 17:26:44 +0800 Subject: [PATCH 2/2] feat(changeset): add changeset --- .changeset/tidy-coins-call.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tidy-coins-call.md diff --git a/.changeset/tidy-coins-call.md b/.changeset/tidy-coins-call.md new file mode 100644 index 0000000000..b75e8ba5c5 --- /dev/null +++ b/.changeset/tidy-coins-call.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/table": patch +--- + +set `onKeyDownCapture` to `undefined` so that users can type with spaces in input or textarea inside a table component (#1968)