Skip to content

Commit

Permalink
Fix #6648: Tooltip default position to 'right' if undefined (#6651)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored May 23, 2024
1 parent 6efc7a7 commit a86970a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/lib/tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Tooltip = React.memo(
const context = React.useContext(PrimeReactContext);
const props = TooltipBase.getProps(inProps, context);
const [visibleState, setVisibleState] = React.useState(false);
const [positionState, setPositionState] = React.useState(props.position);
const [positionState, setPositionState] = React.useState(props.position || 'right');
const [classNameState, setClassNameState] = React.useState('');
const metaData = {
props,
Expand Down Expand Up @@ -449,7 +449,7 @@ export const Tooltip = React.memo(
bindWindowResizeListener();
bindOverlayScrollListener();
} else {
setPositionState(props.position);
setPositionState(props.position || 'right');
setClassNameState('');
currentTargetRef.current = null;
containerSize.current = null;
Expand Down

0 comments on commit a86970a

Please sign in to comment.