Bootstrap 4 Dropdown - Disable auto placement caused by popper.js

前端 未结 4 1998
既然无缘
既然无缘 2020-12-11 03:23

I\'m working with Bootstrap 4 dropdown and there are about 18 dropdown items. Because the height is too much, popper.js automatically moves the dropdown away from its origin

4条回答
  •  盖世英雄少女心
    2020-12-11 03:50

    ZimSystems got it almost right in Bootstrap 4.1. To disable the dropdown changing direction while open, aka. it's x-placement="bottom-end", you should use the "flip" option, instead of the "display" option.

    Display static disables the positioning entirely, while flip only disables the LIVE checks, that flip the dropdown upside down, when you scroll towards the top of the screen.

提交回复
热议问题