Skip to content

Commit 0414a54

Browse files
docs: fix descriptions for closeOnScroll
1 parent 4e9c471 commit 0414a54

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

Diff for: docs/docs/troubleshooting.mdx

+3-9
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,13 @@ This means the tooltip component doesn't have to be a direct child of the scroll
8585

8686
:::
8787

88-
### Use `closeOnEsc` prop
88+
### Use `closeOnScroll` prop
8989

9090
```tsx
91-
<Tooltip closeOnEsc={true} />
91+
<Tooltip closeOnScroll={true} />
9292
```
9393

94-
When `closeOnEsc` is set, scrolling will immediately close the tooltip (`closeOnResize` also exists for closing when resizing the window).
95-
96-
:::caution
97-
98-
For this to work properly, the scrolling element must either be the root `html` tag, the tooltip parent element, or the anchor parent element.
99-
100-
:::
94+
When `closeOnScroll` is set, scrolling will immediately close the tooltip (`closeOnResize` also exists for closing when resizing the window).
10195

10296
## Bad performance
10397

Diff for: docs/docs/upgrade-guide/changelog-v4-v5.md

+1-1
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 the root html tag, the tooltip parent, or the anchor parent (similar to V4's `scrollHide`)
54+
- [x] `closeOnScroll` - `boolean` - when set, the tooltip will close when scrolling (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)