expose popper "strategy" config to dropdown
See original GitHub issueIn regards to the issue: https://github.com/twbs/bootstrap/issues/32947
It would be nice if this could be solved with a simple data attribute by exposing a data attribute for popper for strategy
, like data-bs-strategy
.
Popper documentation: https://popper.js.org/docs/v2/constructors/#strategy Example using existing javascript: https://jsfiddle.net/4gpy025q/1/
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Bootstrap 4 Beta importing Popper.js with Webpack 3.x throws ...
Following the Bootstrap - installing with Webpack documentation, the answer is to simply modify the webpack.config.js with the following:
Read more >Custom dropdown popperConfig={{ strategy: "fixed" }} works ...
I want use popperConfig(strategy: "fixed" ) option in custom dropdown. but It works differently than expected in v2.1.1(bootstrap 5.1) The ...
Read more >Popper API - Material UI - MUI
Name Type Default
open * bool false
anchorEl HTML element | object | func
children node | func
Read more >Using usePopper and styled-components to create a practical ...
Backstory. So my team and I are trying to create our own reusable UI component library that's not based on any UI frameworks...
Read more >FAQ - Popper
If your reference element is position: fixed , use the "fixed" strategy: ... This provides a way to configure some defaults for modifiers,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fully agree with this suggestion.
I’ve just upgraded to BS 5 in my Blazor app. In BS 4, the
data-boundary
attribute worked great for my dropdown needs, but I’m stuck in BS 5, and still haven’t come up with a solution.Having to use
new bootstrap.Dropdown(...)
for dropdown popper configuration in a Blazor app is highly inconvenient, as Blazor does not lend itself towards executing JS as DOM elements come in and out of existence during re-renders. The attribute approach, however, works perfectly.PR in #34120