Skip to content

Commit 45182c5

Browse files
docs: closeOnScroll more accurate description
1 parent ee74255 commit 45182c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/docs/options.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ 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 |
115+
| `closeOnScroll` | `boolean` | no | `false` | `true` `false` | Scrolling will close the tooltip (for this to work, scroll element must be either the root html tag, the tooltip parent, or the anchor parent) |
116116
| `closeOnEsc` | `boolean` | no | `false` | `true` `false` | Resizing the window will close the tooltip |
117117
| `style` | `CSSProperties` | no | | a React inline style | Add inline styles directly to the tooltip |
118118
| `position` | `{ x: number; y: number }` | no | | any `number` value for both `x` and `y` | Override the tooltip position on the DOM |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you run into any problems with the tooltip not updating after changes are mad
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)
5353
- [x] `closeOnEsc` - `boolean` - when set, the tooltip will close after pressing the escape key
54-
- [x] `closeOnScroll` - `boolean` - when set, the tooltip will close when scrolling anywhere on the window (same as V4's `scrollHide`)
54+
- [x] `closeOnScroll` - `boolean` - when set, the tooltip will close when scrolling the root html tag, the tooltip parent, or the anchor parent (similar to V4's `scrollHide`)
5555
- [x] `closeOnResize` - `boolean` - when set, the tooltip will close when resizing the window (same as V4's `resizeHide`)
5656

5757
## `V4` props available in `V5`

0 commit comments

Comments
 (0)