Skip to content

Commit 59b9669

Browse files
Prevent Tooltip flickering by updating Positioner (#1550)
1 parent 0f69d5c commit 59b9669

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/positioner/src/Positioner.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ const Positioner = memo(function Positioner(props) {
134134
}
135135
}, [previousDimensions.height, previousDimensions.width, update, children])
136136

137+
const handleEntering = () => {
138+
transitionState.current = 'entering'
139+
update()
140+
}
141+
137142
const handleEnter = () => {
138143
transitionState.current = 'entered'
139144
update()
@@ -168,6 +173,7 @@ const Positioner = memo(function Positioner(props) {
168173
in={isShown}
169174
timeout={animationDuration}
170175
onEnter={handleEnter}
176+
onEntering={handleEntering}
171177
onEntered={onOpenComplete}
172178
onExited={handleExited}
173179
unmountOnExit

0 commit comments

Comments
 (0)