From 9d63259eeacfe8b8714629e612a20e00293f0a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D5=A1=D3=84=D5=A1?= Date: Sun, 19 May 2024 21:05:51 +0800 Subject: [PATCH] fix(table): v2 input/textarea don't allow spaces inside a table (#3020) * fix(table): set onKeyDownCapture to undefined * feat(changeset): add changeset --- .changeset/tidy-coins-call.md | 5 +++++ packages/components/table/src/use-table.ts | 3 +++ 2 files changed, 8 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) 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)}), }),