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

add maxSelectedItemsQuantity and maxDisplayItemsQuantity properties #37

Open
jpc0rrea opened this issue Apr 18, 2021 · 4 comments
Open

Comments

@jpc0rrea
Copy link

I think a good new feature for this lib would be to add a maxSelectedItemsQuantity and a maxDisplayItemsQuantity, or something like that.

These two properties would control, as their name suggests, the maximum quantity of options that the user can select (maxSelectedItemsQuantity), and the maximum quantity of options displayed on the screen (for long list of options - maxDisplayItemsQuantity).

That's my list issue. Thanks for this awesome lib again!

@koolamusic
Copy link
Owner

Sounds good. PRs are welcome 😄

@dancitron
Copy link

Adding onto this issue, is there any workaround when it comes to limiting the number of items displayed on the dropdown? Love the library btw!

@koolamusic
Copy link
Owner

@dancitron I think an array.slice(0, index_limit) could do this. let me know if you try it out or find something else

@dancitron
Copy link

My workaround came through using the listStyleProps. Limiting the maxH keeps it so it doesn't take up the entire screen.

listStyleProps = {{ maxH: '100px', overflow: 'scroll' }}

I'm throwing together a demo, so this is a pretty simple solution.

When I get some time, I'll try to create a maxDisplayItemsQuantity like OP suggested.

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

No branches or pull requests

3 participants