Skip to content

Commit 67cc2aa

Browse files
docs: closeOnScroll and closeOnResize props
1 parent 4157c6d commit 67cc2aa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/docs/options.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ import { Tooltip } from 'react-tooltip';
112112
| `noArrow` | `boolean` | no | `false` | `true` `false` | Tooltip arrow will not be shown |
113113
| `clickable` | `boolean` | no | `false` | `true` `false` | Allow interaction with elements inside the tooltip. Useful when using buttons and inputs |
114114
| `closeOnEsc` | `boolean` | no | `false` | `true` `false` | Pressing escape key will close the tooltip |
115+
| `closeOnScroll` | `boolean` | no | `false` | `true` `false` | Scrolling anywhere on the window will close the tooltip |
116+
| `closeOnEsc` | `boolean` | no | `false` | `true` `false` | Resizing the window will close the tooltip |
115117
| `style` | `CSSProperties` | no | | a React inline style | Add inline styles directly to the tooltip |
116118
| `position` | `{ x: number; y: number }` | no | | any `number` value for both `x` and `y` | Override the tooltip position on the DOM |
117119
| `isOpen` | `boolean` | no | handled by internal state | `true` `false` | The tooltip can be controlled or uncontrolled, this attribute can be used to handle show and hide tooltip outside tooltip (can be used **without** `setIsOpen`) |

docs/docs/upgrade-guide/changelog-v4-v5.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ If you run into any problems with the tooltip not updating after changes are mad
5050
- [x] `float` - `boolean` - used to achieve V4's `effect="float"`
5151
- [x] `hidden` - `boolean` - when set, the tooltip will not show
5252
- [x] `render` - `function` - can be used to render dynamic content based on the active anchor element (check [the examples](../examples/render.mdx) for more details)
53+
- [x] `closeOnScroll` - `boolean` - when set, the tooltip will close when scrolling anywhere on the window
54+
- [x] `closeOnResize` - `boolean` - when set, the tooltip will close when resizing the window
5355

5456
## `V4` props available in `V5`
5557

0 commit comments

Comments
 (0)