You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix issue related to legacy trigger
* Fix support for hide_arrow
* Add in support for offset
* Improve tests
* Bump react-bootstrap version
* Format
* Add additional popover examples
* Change default body behaviour
* Add legacy integration test
* Improve popover doc examples
* Format
* Update dependencies
* Remove redundant Jest config
* Set rootClose to false if legacy trigger removed
* Remove rogue comma
* Fix popover tests
Co-authored-by: tcbegley <[email protected]>
Copy file name to clipboardExpand all lines: docs/components_page/components/popover.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,13 @@ lead: Use the Popover component to add Bootstrap popovers to any component in yo
5
5
6
6
## Examples
7
7
8
-
To use `Popover`, add it to your layout, and set the `target` argument to the `id` of the component you would like to attach the popover to. The easiest way to trigger the popover is to specify the `trigger` property. This should be a string containing any of the following 4 values (space separated)
8
+
To use `Popover`, add it to your layout, and set the `target` argument to the `id` of the component you would like to attach the popover to. You can add content to the popover quickly by specifying `body=True`, or make use of the `PopoverBody` (see below for more details).
9
+
10
+
{{example:components/popover/simple.py:popovers}}
11
+
12
+
## Trigger Types
13
+
14
+
The easiest way to trigger the popover is to specify the `trigger` property. This should be a string containing any of the following 4 values (space separated)
9
15
10
16
*`"click"`: toggles the popover when the target is clicked.
11
17
*`"focus"`: toggles the popover when the target receives focus
@@ -14,6 +20,12 @@ To use `Popover`, add it to your layout, and set the `target` argument to the `i
Alternatively, you can manually control the appearance of the popover using callbacks by setting the `is_open` property of the `Popover`. This can be useful for example when you want to make the popover appear after the user interacts with something other than the target component as demonstrated in the below example.
@@ -26,6 +38,13 @@ Use the `placement` argument to control the placement of the `Popover`. The basi
0 commit comments