Bootstrap-select: Selectpicker in div with overflow: hidden

Created on 12 Jul 2014  路  4Comments  路  Source: snapappointments/bootstrap-select

Bootstrap-select doesn't seem to calculate the available space correctly in the case where overflow: hidden; is set in the container div.

http://jsfiddle.net/anton164/J9kfC/1/

There are workarounds of course, like setting data-size, but when the content height varies, it would be ideal if it could calculate available height under based on the container div which has overflow: hidden (if some option is set).

Most helpful comment

You need to set container: 'body'.

See http://silviomoreto.github.io/bootstrap-select/#container

All 4 comments

You need to set container: 'body'.

See http://silviomoreto.github.io/bootstrap-select/#container

This solution is perfect, but the link seems to be wrong, following an alternative: http://silviomoreto.github.io/bootstrap-select/examples/#container

Spent wayyyy too much time figuring this out. Thanks everyone.

Was this page helpful?
0 / 5 - 0 ratings