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

Select list not scrolling #2592

Closed
neilhanvey opened this issue Jan 4, 2016 · 11 comments
Closed

Select list not scrolling #2592

neilhanvey opened this issue Jan 4, 2016 · 11 comments

Comments

@neilhanvey
Copy link

I have a select with a large number of items, it cuts off and will not scroll to these items using the scroll wheel. If i open the select and click the down arrow on the keyboard it scrolls ok. Any ideas on a fix? This is in all browsers

@acburst
Copy link
Collaborator

acburst commented Jan 5, 2016

Can you post a codepen or something? It seems to be working for me locally

@dbnoble
Copy link

dbnoble commented Jan 26, 2016

Is there a scroll bar visible? If not, set a max-height for the element as well as overflow: auto in your css.

@diegogurgel
Copy link

Hi @neilhanvey try call material_select() passing the select id
$('#select-id').material_select();

@decadence
Copy link

decadence commented Apr 16, 2016

I have this issue too. It's because select dropdown has max-height property and overflow: hidden (if I remember correctly).
This piece of styles helped me to show scroll:

.select-dropdown{
    overflow-y: auto !important;
}

@fega
Copy link

fega commented May 2, 2017

Please provide a way to reproduce it. like a codepen

Closed due inactivity, feel free to reopen it if it is still necessary.

@fega fega closed this as completed May 2, 2017
@apudiu
Copy link

apudiu commented Nov 7, 2017

Man, that problem really exists... You just cannot close due to inactivity, bear in mind this framework is not so popular that you will get huge traffic.

I'm also experiencing this issue, I've a form inside a bottom sheet modal & there's 5 dropdown's, (checkout the img), the first three dropdown shows scrollbar some times & sometimes not. & 2nd line has 2 scrollbar, those never shows scrollbars, sometimes it shows for a sec & then hides,

I'm filling <option></option> data using an (jquery) Ajax call. & as of documentation I'm destroying the previous elements & re calling the initiator.

So, we need fix, if you have more questions then pls feel free to ask.

image

ssc

@Ross-Rawlins
Copy link

Did you find a solution to this/

@bugy
Copy link

bugy commented Mar 7, 2019

For those who are still facing the issue, try adding backface-visibility: hidden to the .dropdown-content.
For me the issue happened only in chrome, and according to multiple stackoverflow discussions, backface-visibility: visible works unreliably with different transformations in Chrome.

@xblue-light
Copy link

xblue-light commented Apr 3, 2019

@bugy solution worked for me, currently working with x5 optgroups and 5+ options per optgroup the max-height was gigantic and not very practical so here is the final result that fixed all my issues:

.dropdown-content {
    max-height: 350px !important;
    overflow-y: auto !important;
    backface-visibility: hidden !important;
}

Thanks again @bugy and other contributors!

@Souvik04
Copy link

How can I override the CSS class dropdown-content in ReactJS?

@pidugusundeep
Copy link

@xblue-light Thanks this helped.

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