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: cell editing can't be cancelled when invalid #5750

Closed
inad9300 opened this issue Jan 12, 2024 · 1 comment · Fixed by #5756
Closed

DataTable: cell editing can't be cancelled when invalid #5750

inad9300 opened this issue Jan 12, 2024 · 1 comment · Fixed by #5756
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@inad9300
Copy link
Contributor

inad9300 commented Jan 12, 2024

Describe the bug

When cellEditValidator returns false, indicating an invalid value, pressing "Esc" to cancel your changes doesn't work.

Reproducer

https://codesandbox.io/p/devbox/primereact-demo-forked-lyzcc9?file=%2Fsrc%2FApp.jsx%3A26%2C7

PrimeReact version

10.3.1

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Steps to reproduce the behavior

Edit some cell of the quantity column. When changing it to a different number, edit cancellation is possible. When changing it to some letters, edit cancellation isn't possible.

@inad9300 inad9300 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 12, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 12, 2024
@melloware melloware self-assigned this Jan 12, 2024
@melloware melloware added this to the 10.4.0 milestone Jan 12, 2024
melloware added a commit to melloware/primereact that referenced this issue Jan 12, 2024
@melloware
Copy link
Member

Great reproducer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants