We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75bdea5 commit f1dc3caCopy full SHA for f1dc3ca
1 file changed
components/lib/tooltip/Tooltip.js
@@ -463,8 +463,14 @@ export const Tooltip = React.memo(
463
const position = getPosition(currentTargetRef.current);
464
const classname = getTargetOption(currentTargetRef.current, 'classname');
465
466
- setPositionState(position);
467
- setClassNameState(classname);
+ if (position !== positionState) {
+ setPositionState(position);
468
+ }
469
+
470
+ if (classname !== classNameState) {
471
+ setClassNameState(classname);
472
473
474
updateTooltipState(position);
475
476
bindWindowResizeListener();
0 commit comments