mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
Add code to method/property tables (#31130)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -164,32 +164,32 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>animation</td>
|
||||
<td><code>animation</code></td>
|
||||
<td>boolean</td>
|
||||
<td>true</td>
|
||||
<td><code>true</code></td>
|
||||
<td>Apply a CSS fade transition to the popover</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>container</td>
|
||||
<td><code>container</code></td>
|
||||
<td>string | element | false</td>
|
||||
<td>false</td>
|
||||
<td><code>false</code></td>
|
||||
<td>
|
||||
<p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>content</td>
|
||||
<td><code>content</code></td>
|
||||
<td>string | element | function</td>
|
||||
<td>''</td>
|
||||
<td><code>''</code></td>
|
||||
<td>
|
||||
<p>Default content value if <code>data-content</code> attribute isn't present.</p>
|
||||
<p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>delay</td>
|
||||
<td><code>delay</code></td>
|
||||
<td>number | object</td>
|
||||
<td>0</td>
|
||||
<td><code>0</code></td>
|
||||
<td>
|
||||
<p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
|
||||
<p>If a number is supplied, delay is applied to both hide/show</p>
|
||||
@@ -197,28 +197,28 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>html</td>
|
||||
<td><code>html</code></td>
|
||||
<td>boolean</td>
|
||||
<td>false</td>
|
||||
<td><code>false</code></td>
|
||||
<td>Insert HTML into the popover. If false, <code>innerText</code> property will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>placement</td>
|
||||
<td><code>placement</code></td>
|
||||
<td>string | function</td>
|
||||
<td>'right'</td>
|
||||
<td><code>'right'</code></td>
|
||||
<td>
|
||||
<p>How to position the popover - auto | top | bottom | left | right.<br>When <code>auto</code> is specified, it will dynamically reorient the popover.</p>
|
||||
<p>When a function is used to determine the placement, it is called with the popover DOM node as its first argument and the triggering element DOM node as its second. The <code>this</code> context is set to the popover instance.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>selector</td>
|
||||
<td><code>selector</code></td>
|
||||
<td>string | false</td>
|
||||
<td>false</td>
|
||||
<td><code>false</code></td>
|
||||
<td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/Johann-S/pen/djJYPb">an informative example</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>template</td>
|
||||
<td><code>template</code></td>
|
||||
<td>string</td>
|
||||
<td><code>'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'</code></td>
|
||||
<td>
|
||||
@@ -230,61 +230,61 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>title</td>
|
||||
<td><code>title</code></td>
|
||||
<td>string | element | function</td>
|
||||
<td>''</td>
|
||||
<td><code>''</code></td>
|
||||
<td>
|
||||
<p>Default title value if <code>title</code> attribute isn't present.</p>
|
||||
<p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>trigger</td>
|
||||
<td><code>trigger</code></td>
|
||||
<td>string</td>
|
||||
<td>'click'</td>
|
||||
<td><code>'click'</code></td>
|
||||
<td>How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. <code>manual</code> cannot be combined with any other trigger.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>offset</td>
|
||||
<td><code>offset</code></td>
|
||||
<td>number | string</td>
|
||||
<td>0</td>
|
||||
<td><code>0</code></td>
|
||||
<td>Offset of the popover relative to its target. For more information refer to Popper.js's <a href="https://popper.js.org/docs/v1/#modifiers..offset.offset">offset docs</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fallbackPlacement</td>
|
||||
<td><code>fallbackPlacement</code></td>
|
||||
<td>string | array</td>
|
||||
<td>'flip'</td>
|
||||
<td><code>'flip'</code></td>
|
||||
<td>Allow to specify which position Popper will use on fallback. For more information refer to
|
||||
Popper.js's <a href="https://popper.js.org/docs/v1/#modifiers..flip.behavior">behavior docs</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>boundary</td>
|
||||
<td><code>boundary</code></td>
|
||||
<td>string | element</td>
|
||||
<td>'scrollParent'</td>
|
||||
<td><code>'scrollParent'</code></td>
|
||||
<td>Overflow constraint boundary of the popover. Accepts the values of <code>'viewport'</code>, <code>'window'</code>, <code>'scrollParent'</code>, or an HTMLElement reference (JavaScript only). For more information refer to Popper.js's <a href="https://popper.js.org/docs/v1/#modifiers..preventOverflow.boundariesElement">preventOverflow docs</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sanitize</td>
|
||||
<td><code>sanitize</code></td>
|
||||
<td>boolean</td>
|
||||
<td>true</td>
|
||||
<td><code>true</code></td>
|
||||
<td>Enable or disable the sanitization. If activated <code>'template'</code>, <code>'content'</code> and <code>'title'</code> options will be sanitized.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>allowList</td>
|
||||
<td><code>allowList</code></td>
|
||||
<td>object</td>
|
||||
<td><a href="{{< docsref "/getting-started/javascript#sanitizer" >}}">Default value</a></td>
|
||||
<td>Object which contains allowed attributes and tags</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sanitizeFn</td>
|
||||
<td><code>sanitizeFn</code></td>
|
||||
<td>null | function</td>
|
||||
<td>null</td>
|
||||
<td><code>null</code></td>
|
||||
<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>popperConfig</td>
|
||||
<td><code>popperConfig</code></td>
|
||||
<td>null | object</td>
|
||||
<td>null</td>
|
||||
<td><code>null</code></td>
|
||||
<td>To change Bootstrap's default Popper.js config, see <a href="https://popper.js.org/docs/v1/#Popper.Defaults">Popper.js's configuration</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user