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

Overflow issue for fields that have a large amount of options/choices #30

Open
dave4jr opened this issue Oct 8, 2016 · 6 comments
Open

Comments

@dave4jr
Copy link

dave4jr commented Oct 8, 2016

I was having an issue where if I had a field with large amount of choices (i.e. - State or Country Field), there was no scrollbar and the list overflowed outside of the div. I fixed this by setting:

.nice-select .list { max-height: 300px; overflow: scroll; }

@Sinequanonh
Copy link

+1

@Surbma
Copy link

Surbma commented May 21, 2017

Just, what I needed. I've add a little fix:

.nice-select .list { max-height: 300px; overflow-y: scroll; }

@kenshinman
Copy link

Errrm, this didn't work until I added .open to .nice-select

.nice-select.open .list { max-height: 300px; overflow-y: scroll; }

@yaniv-mobilebrain
Copy link

Problem is, elements hidden atthe bottom of the list won't show up, and you need to take care of it in the click handler, to get the selected element into focus.

I solved it like this:

$(".nice-select.main").on("click", function() { setTimeout(function() { $(this).find(".list li.selected")[0].scrollIntoView(); }.bind(this), 100); });

@basheer-atx
Copy link

Not working for me

@harontaiko
Copy link

Apparently, combining @Surbma and @yaniv-mobilebrain' s solutions, fixed the problem of content overflowing inside a div and maintains a height of 300px and also the contents inside ul.list become scrollable
Screenshot from 2024-01-25 09-00-46

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

7 participants