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

limit size of select menu #327

Closed
data-handler opened this issue Dec 18, 2020 · 4 comments
Closed

limit size of select menu #327

data-handler opened this issue Dec 18, 2020 · 4 comments

Comments

@data-handler
Copy link

Hi

apologies if I should be posting this elsewhere.

Just wanted to ask if there's a way to limit the number of items displayed in the select menu?

Currently it defaults to showing as many as will fit on screen.

Thanks

@amorey
Copy link
Member

amorey commented Dec 19, 2020

Currently, you can't limit the number of items displayed in the select menu. Which library are you using? Depending on which one you're using you may be able to override the default behavior and implement your own menu.

@data-handler
Copy link
Author

Thanks for replying. I am using the css/js library, not React.

@amorey
Copy link
Member

amorey commented Dec 20, 2020

Can you use the browser's built-in select menu? If so you can enable it using the mui-select--use-default class:

<div class="mui-select mui-select--use-default">
  <select>
    <option selected>A</option>
    <option>B</option>
    <option>C</option>
  </select>
  <label>Label</label>
</div>

@data-handler
Copy link
Author

that works. thanks

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