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

MultiSelect: selectionLimit does not limit selections #6391

Closed
XYIAN opened this issue Apr 12, 2024 · 1 comment · Fixed by #6218
Closed

MultiSelect: selectionLimit does not limit selections #6391

XYIAN opened this issue Apr 12, 2024 · 1 comment · Fixed by #6218
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Milestone

Comments

@XYIAN
Copy link

XYIAN commented Apr 12, 2024

Describe the bug

When using MultiSelect with a selectionLimit (for example a selection limit of 2) the component still allows me to select an unlimited amount of options.

Reproducer

https://stackblitz.com/edit/vitejs-vite-qu7tmj?file=src%2FApp.tsx

PrimeReact version

10.5.1

React version

18.x

Language

TypeScript

Browser(s)

ALL

Steps to reproduce the behavior

  1. use multi select
  2. give 3+ options
  3. add selectionLimit of 2 and select more than two options

Expected behavior

This should only allow you to select whatever the limit is set to, but it does not

@XYIAN XYIAN 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 12, 2024
@melloware
Copy link
Member

Duplicate of #6121 ?

@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 Apr 13, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 13, 2024
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

Successfully merging a pull request may close this issue.

2 participants