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

Option to truncate the number of chips displayed. #149

Open
JJSLIoT opened this issue Feb 22, 2023 · 5 comments
Open

Option to truncate the number of chips displayed. #149

JJSLIoT opened this issue Feb 22, 2023 · 5 comments

Comments

@JJSLIoT
Copy link

JJSLIoT commented Feb 22, 2023

Feature request:
Option to truncate the number of chips displayed. And then display a "+x" text after the max number of chips is exhausted(similar to how Gmail does for email chips).

Currently, there is no limit on the number of selected items displayed, so it becomes a bit inconvenient for the user, because, the drop-down's height keeps on changing on each item select/unselect.

Having the option to truncate the max number of selected elements would be great!

@hoaphantn7604
Copy link
Owner

hi @JairajJangleSLIOT ,
I'm working on it.

@hoaphantn7604
Copy link
Owner

Hi @JairajJangleSLIOT ,

You can use props "minHeight" customize min height for list container and "maxHeight" customize max height for list container.

Example:

   <Dropdown 
      {...}
      minHeight={200}
      maxHeight={200}
   />

@JJSLIoT
Copy link
Author

JJSLIoT commented Mar 8, 2023

Hi @hoaphantn7604, I will try this, but will this allow me to truncate the number of chips like in Gmail app?

@JJSLIoT
Copy link
Author

JJSLIoT commented Mar 13, 2023

@hoaphantn7604 setting the minHeight and maxHeight parameters as described does not truncate the number of chips, the chips keeps on adding and so the drop down keeps on shifting below as the number of selected chips grow.

@hoaphantn7604
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants