Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown — Drop flip option #33198

Merged
merged 3 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions js/src/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'

const Default = {
offset: [0, 2],
flip: true,
boundary: 'clippingParents',
reference: 'toggle',
display: 'dynamic',
Expand All @@ -82,7 +81,6 @@ const Default = {

const DefaultType = {
offset: '(array|string|function)',
flip: 'boolean',
boundary: '(string|element)',
reference: '(string|element|object)',
display: 'string',
Expand Down Expand Up @@ -328,7 +326,6 @@ class Dropdown extends BaseComponent {
modifiers: [{
name: 'preventOverflow',
options: {
altBoundary: this._config.flip,
boundary: this._config.boundary
}
},
Expand Down
6 changes: 0 additions & 6 deletions site/content/docs/5.0/components/dropdowns.md
Original file line number Diff line number Diff line change
Expand Up @@ -979,12 +979,6 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
</tr>
</thead>
<tbody>
<tr>
<td><code>flip</code></td>
<td>boolean</td>
<td><code>true</code></td>
<td>Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to Popper's <a href="https://popper.js.org/docs/v2/modifiers/flip/">flip docs</a>.</td>
</tr>
<tr>
<td><code>boundary</code></td>
<td>string | element</td>
Expand Down
2 changes: 2 additions & 0 deletions site/content/docs/5.0/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ toc: true
var dropdown = new bootstrap.Dropdown('[data-bs-toggle="dropdown"]')
```

- Dropped `flip` option for dropdown plugin in favor of native popper configuration. You can now disable the flipping behavior by passing an empty array for [`fallbackPlacements`](https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements) option in [flip](https://popper.js.org/docs/v2/modifiers/flip/) modifier.

### Utilities

- Dropped the `0` entry in `$border-widths` map to remove the duplicated `.border-0` class.
Expand Down