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

Chips: Prevent chip delete with backspace when removable is a function #6427

Closed
guilhermekf opened this issue Apr 19, 2024 · 2 comments · Fixed by #6428 or leoo1992/GeradorQRCode#23
Closed
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@guilhermekf
Copy link

Describe the bug

Right now if I am using removable as false and I try to hit backspace it prevent the deletion of the chips,
My problem is that if I am using a function to define which chips are removable I can delete all of them with the backspace

Reproducer

https://stackblitz.com/edit/ai1xhn?file=src%2FApp.jsx

PrimeReact version

10.6.3

React version

17.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

Chips should not be deleted with backspace if am using the function in the removable

@guilhermekf guilhermekf added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 19, 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 Apr 19, 2024
@melloware
Copy link
Member

Yep the BackSpace key probably need to check the removable function.

melloware added a commit to melloware/primereact that referenced this issue Apr 20, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 20, 2024
@melloware melloware self-assigned this Apr 20, 2024
@melloware
Copy link
Member

PR submitted.

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
2 participants