Skip to content

Commit

Permalink
fix(table): v2 input/textarea don't allow spaces inside a table (#3020)
Browse files Browse the repository at this point in the history
* fix(table): set onKeyDownCapture to undefined

* feat(changeset): add changeset
  • Loading branch information
wingkwong authored May 19, 2024
1 parent f5bf12a commit 9d63259
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-coins-call.md
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 3 additions & 0 deletions packages/components/table/src/use-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ export function useTable<T extends object>(originalProps: UseTableProps<T>) {
}),
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)}),
}),
Expand Down

0 comments on commit 9d63259

Please sign in to comment.