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 label parameter #2548

Closed
Axel-Latour opened this issue Apr 18, 2017 · 4 comments
Closed

MultiSelect label parameter #2548

Axel-Latour opened this issue Apr 18, 2017 · 4 comments
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@Axel-Latour
Copy link

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[x ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Expected behavior
Add a parameter for the MultiSelect to set a constant label instead of the selected data.

What is the motivation / use case for changing the behavior?
If the selected data are too long, the MultiSelect becomes really awful and barely readable...

@codechamploo
Copy link

This would be a useful one. I would suggest taking it a step further and add a "max items before cut off" value. For example, if n items are selected, the label parameter will take effect so we can see something like "5 Selected", "6 Selected", if the threshold is set at 4 items.

@Mrtcndkn Mrtcndkn self-assigned this Apr 24, 2017
@Mrtcndkn Mrtcndkn added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Apr 24, 2017
@Mrtcndkn Mrtcndkn added this to the 4.0.0-Final milestone Apr 24, 2017
@Mrtcndkn
Copy link
Contributor

Mrtcndkn commented Apr 24, 2017

3 new attribute added to multiselect component for this issue. After 4.0.0-Final multiselect component will have displaySelectedLabel attribute for deciding to show the defaultLabel or with new maxItems attribute.maxItems attribute have a default value of 3. After 3 selections container displays a message like "4 items selected". And you can specify your own message for this with new selectedItemsLabel attribute which is by default have a value of "{0} items selected". @Helayxa @codechamploo

@cagataycivici cagataycivici removed this from the 4.0.0-RC4 milestone Apr 27, 2017
@siddharthaReddy
Copy link

@Mrtcndkn @cagataycivici
Is it possible to add this to latest 2.x version too? I have strict limitation on Angular version and cannot update it to 4.x, which implies PrimeNG 2.x.

Any help is appreciated. Thanks

@mertsincan mertsincan added this to the 4.0.0-RC4 milestone Oct 18, 2018
@BeaRRRRR
Copy link

FYI: the maxItems attribute is now called maxSelectedLabels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

7 participants