question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expose popper "strategy" config to dropdown

See original GitHub issue

In 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:open
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Raucecommented, Jun 10, 2021

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.

1reaction
719mediacommented, May 26, 2021

PR in #34120

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found