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

Adding collapsable prop for multiselect groups #7427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glagioia
Copy link

@glagioia glagioia commented Nov 16, 2024

Fix: #7426

Feature: Collapsible Option Groups in MultiSelect

Why this change?
In scenarios where a MultiSelect component contains numerous groups with a large number of options within each group, the list can become overwhelming to navigate. While filtering options is already available, I felt it was logical and user-friendly to introduce collapsible groups to enhance usability.

What does this change bring?

Collapsible Groups: Users can now expand or collapse groups to manage the visibility of options within each group.

Improved User Experience: This feature makes it easier to navigate through groups, especially when dealing with a long list of options.

Optional Behavior: This functionality is opt-in and can be controlled via a new optionGroupCollapsable prop.

Implementation Details
Added optionGroupCollapsable as a new prop to enable collapsible group headers.
Clicking on a group header toggles its visibility.
Collapsed and expanded states are visually indicated through icons (pi-chevron-right for collapsed and pi-chevron-down for expanded).
Backward compatibility is preserved, as this feature is disabled by default.
This addition aligns with the existing feature set of the MultiSelect component and provides an enhanced way to handle larger datasets efficiently.

prime-react-collapsable-doc

prime-react-collapsable-api-doc

2024-11-16.15-56-35.mp4

Copy link

vercel bot commented Nov 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Updated (UTC)
primereact ⬜️ Ignored (Inspect) Visit Preview Nov 16, 2024 9:28pm
primereact-v9 ⬜️ Ignored (Inspect) Visit Preview Nov 16, 2024 9:28pm

Copy link

Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>.

@melloware melloware added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Nov 16, 2024
@glagioia glagioia force-pushed the feature/multiselect-groups-collapsable branch from 873c60b to 98a4133 Compare November 16, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiselect: Collapsable Groups
3 participants