Prevent select2 from flipping the dropdown upward

2019-02-01 22:21发布

As per title, is there a way to force select2 to always create a dropdown instead of a drop-up?

There also appears to be some javascript that is either causing the flip when you scroll above the dropdown, adding a new CSS class "select2-drop-above", or both.

EDIT: I should've specified that I'm pulling the library in via select2-rails. I'm hoping there is a way around this that doesn't involve pulling the whole select2 lib in myself and editing the select2.js file directly.

7条回答
放荡不羁爱自由
2楼-- · 2019-02-01 23:03
.select2-dropdown--above { bottom: auto !important; }
查看更多
登录 后发表回答