From b9e51dc3c4400ede5e72991dd0efacf9dbcb694e Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Tue, 2 Mar 2021 20:57:13 +0530 Subject: [PATCH] =?utf8?q?Dropdown=20=E2=80=94=20Drop=20`flip`=20option=20?= =?utf8?q?(#33198)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/src/dropdown.js | 3 --- site/content/docs/5.0/components/dropdowns.md | 6 ------ site/content/docs/5.0/migration.md | 2 ++ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/js/src/dropdown.js b/js/src/dropdown.js index fea0b1919b..eeec9076d5 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -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 } }, diff --git a/site/content/docs/5.0/components/dropdowns.md b/site/content/docs/5.0/components/dropdowns.md index d74eec765d..52da465a37 100644 --- a/site/content/docs/5.0/components/dropdowns.md +++ b/site/content/docs/5.0/components/dropdowns.md @@ -979,12 +979,6 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - - flip - boolean - true - Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to Popper's flip docs. - boundary string | element diff --git a/site/content/docs/5.0/migration.md b/site/content/docs/5.0/migration.md index 0260382302..337dfd9afc 100644 --- a/site/content/docs/5.0/migration.md +++ b/site/content/docs/5.0/migration.md @@ -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. -- 2.47.2