Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohit Sharma <rohit2sharma95@gmail.com>2020-12-18 11:00:36 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-01-28 13:23:33 +0300
commite036e604ded87cc3c0b6917aa21e571fb15e8dbd (patch)
tree1430f2c580c9727d2f4a7d5ac9950ef066c46a92 /site/content
parentb1bd54955ed5d6cd3eeb848dd068fc8bca88d585 (diff)
Update docs for `offset` option
Diffstat (limited to 'site/content')
-rw-r--r--site/content/docs/5.0/components/dropdowns.md6
-rw-r--r--site/content/docs/5.0/components/popovers.md10
-rw-r--r--site/content/docs/5.0/components/tooltips.md10
-rw-r--r--site/content/docs/5.0/migration.md1
4 files changed, 24 insertions, 3 deletions
diff --git a/site/content/docs/5.0/components/dropdowns.md b/site/content/docs/5.0/components/dropdowns.md
index b2abbc7bd8..37c3a74c11 100644
--- a/site/content/docs/5.0/components/dropdowns.md
+++ b/site/content/docs/5.0/components/dropdowns.md
@@ -901,9 +901,9 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
<td>array | string | function</td>
<td><code>[0, 0]</code></td>
<td>
- <p>Offset of the dropdown relative to its target.</p>
- <p>When a function is used to determine the offset, it is called with an object containing the <code>popper</code> instance, the <code>refecence</code> Element and the <code>placement</code> as its first argument. The function must return an array with two numbers: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>. The triggering element DOM node is passed as the second argument.</p>
- <p>For more information refer to Popper.js's <a href="https://popper.js.org/docs/v2/modifiers/offset/#options">offset docs</a>.</p>
+ <p>Offset of the dropdown relative to its target. You can pass a string in data attributes with comma separated values like: <code>data-bs-offset="10,20"</code></p>
+ <p>When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>.</p>
+ <p>For more information refer to Popper's <a href="https://popper.js.org/docs/v2/modifiers/offset/#options">offset docs</a>.</p>
</td>
</tr>
<tr>
diff --git a/site/content/docs/5.0/components/popovers.md b/site/content/docs/5.0/components/popovers.md
index ccaf1f63f9..ddfc6c130a 100644
--- a/site/content/docs/5.0/components/popovers.md
+++ b/site/content/docs/5.0/components/popovers.md
@@ -268,6 +268,16 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
<td>Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization.</td>
</tr>
<tr>
+ <td><code>offset</code></td>
+ <td>array | string | function</td>
+ <td><code>[0, 0]</code></td>
+ <td>
+ <p>Offset of the popover relative to its target. You can pass a string in data attributes with comma separated values like: <code>data-bs-offset="10,20"</code></p>
+ <p>When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>.</p>
+ <p>For more information refer to Popper's <a href="https://popper.js.org/docs/v2/modifiers/offset/#options">offset docs</a>.</p>
+ </td>
+ </tr>
+ <tr>
<td><code>popperConfig</code></td>
<td>null | object</td>
<td><code>null</code></td>
diff --git a/site/content/docs/5.0/components/tooltips.md b/site/content/docs/5.0/components/tooltips.md
index 8f5aac5335..ea4762a673 100644
--- a/site/content/docs/5.0/components/tooltips.md
+++ b/site/content/docs/5.0/components/tooltips.md
@@ -293,6 +293,16 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
<td>Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization.</td>
</tr>
<tr>
+ <td><code>offset</code></td>
+ <td>array | string | function</td>
+ <td><code>[0, 0]</code></td>
+ <td>
+ <p>Offset of the tooltip relative to its target. You can pass a string in data attributes with comma separated values like: <code>data-bs-offset="10,20"</code></p>
+ <p>When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>.</p>
+ <p>For more information refer to Popper's <a href="https://popper.js.org/docs/v2/modifiers/offset/#options">offset docs</a>.</p>
+ </td>
+ </tr>
+ <tr>
<td><code>popperConfig</code></td>
<td>null | object</td>
<td><code>null</code></td>
diff --git a/site/content/docs/5.0/migration.md b/site/content/docs/5.0/migration.md
index 49d11a9896..850e27ab61 100644
--- a/site/content/docs/5.0/migration.md
+++ b/site/content/docs/5.0/migration.md
@@ -20,6 +20,7 @@ toc: true
### JavaScript
+- Restored `offset` option for Dropdown, Popover and Tooltip plugins.
- The default value for the `fallbackPlacements` is changed to `['top', 'right', 'bottom', 'left']` for better placement of popper elements.
## v5.0.0-beta1