-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - Inputs inside selectable table row cannot be focused #3685
Comments
any solution for this? |
Hmm, I can't really think of a use case for this. Wouldn't setting That being said, if it's absolutely necessary, you can implement it this way to allow focus (but be sure to test as it might have other side effects). <TableCell key="row1-description">
<Input
placeholder="description"
onPointerDown={(e) => {
e.stopPropagation();
e.currentTarget.focus();
}}
/>
</TableCell> |
There are thousands of web interfaces that exist where rows are both selectable and have editable fields. Let's take the NextUI components table of employee information as our example. In this table, let's say the hypothetical customer requirement is to add an editable inline phone number field. This bug directly prevents you from being able to add that feature. The suggestion for stopping event propagation has inconsistent behavior due to how the NextUI |
It seems that the React Spectrum team is considering addressing this issue. |
Related to #3681 |
NextUI Version
2.4.6
Describe the bug
A
Table
with propsselectionMode='single'
orselectionMode='multiple'
preventsInput
components from being clickable.Instead, the
Table
row is selected.If the user clicks within a few pixels of the border of the
Input
component, they are able to select theInput
and type but it also selects theTable
row.Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Observe the behavior of how the
Input
versus theSelect
element when in aTable
with selection.Expected behavior
As a user, I expect the
Input
component to function similar to theSelect
element, properly capturing the focus and preventing propagation of the event toTable
row selection.Screenshots or Videos
Operating System Version
Browser
Chrome
The text was updated successfully, but these errors were encountered: