Skip to content
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

DataTable: On click at dropdown option in a cell editor doesn't set the value for the datatable cell - Keypress works #5122

Closed
hu9000 opened this issue Oct 19, 2023 · 3 comments
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted

Comments

@hu9000
Copy link

hu9000 commented Oct 19, 2023

Describe the bug

Using the mouse to select an option from the dropdown doesn't set the value in the "Country" column of the datatable. But, using the keyboard ("tab" ,"enter" ), said value is updated at the datatable with cell editor.

Reproducer

https://codesandbox.io/s/elastic-yalow-hdlfzx?file=/src/App.tsx

PrimeReact version

10.0.5

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to Country cell and click it
  2. Click on the dropdown
  3. Select any country option
  4. Value at the datatable cell is not updated.
    Screen sample of the behavior

Expected behavior

Country cell must be updated to the country selected on the dropdown. Like press the DOWN key then TAB is working.

@hu9000 hu9000 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 19, 2023
@melloware
Copy link
Member

Duplicate of #2666 see that ticket for the solution.

Let me know if that doesn't work.

@melloware melloware added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 20, 2023
@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2023
@hu9000
Copy link
Author

hu9000 commented Oct 20, 2023

Thank you for your response.
After adding the code appendTo={"self"} to the dropdown you can now select the clicked option. But now when I navigate through the list of options with the keyboard, when I get to the last visible option, the list closes automatically.

@melloware
Copy link
Member

@hu9000 see #4482

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

No branches or pull requests

2 participants