]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Dropdown — Drop `flip` option (#33198)
authorRohit Sharma <rohit2sharma95@gmail.com>
Tue, 2 Mar 2021 15:27:13 +0000 (20:57 +0530)
committerGitHub <noreply@github.com>
Tue, 2 Mar 2021 15:27:13 +0000 (17:27 +0200)
js/src/dropdown.js
site/content/docs/5.0/components/dropdowns.md
site/content/docs/5.0/migration.md

index fea0b1919b4e8aba4d94f8811e482206e664f22f..eeec9076d52aaf1b77cce1dbb43c5d72e3d5cb0f 100644 (file)
@@ -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',
@@ -82,7 +81,6 @@ const Default = {
 
 const DefaultType = {
   offset: '(array|string|function)',
-  flip: 'boolean',
   boundary: '(string|element)',
   reference: '(string|element|object)',
   display: 'string',
@@ -328,7 +326,6 @@ class Dropdown extends BaseComponent {
       modifiers: [{
         name: 'preventOverflow',
         options: {
-          altBoundary: this._config.flip,
           boundary: this._config.boundary
         }
       },
index d74eec765d5abdf00fbde0b0db2b08013cb8471f..52da465a3712987101b7b1e5975ae94a51350e1b 100644 (file)
@@ -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>
index 026038230257045cea36d6b7d51e1b9aa7441f8c..337dfd9afc5f84714791ebc778a2143c3fe46031 100644 (file)
@@ -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.