Skip to content

Commit

Permalink
Fix primefaces#2878: Tooltip global respect data-pr-position
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed May 12, 2022
1 parent 768628d commit 529c713
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 @@ -172,7 +172,7 @@ export const Tooltip = React.memo(React.forwardRef((props, ref) => {
DomHandler.removeClass(elementRef.current, 'p-tooltip-active');

setVisibleState(false);
setPositionState(props.position);
setPositionState(getPosition(currentTargetRef.current));
currentTargetRef.current = null;
containerSize.current = null;
allowHide.current = true;
Expand Down Expand Up @@ -435,7 +435,7 @@ export const Tooltip = React.memo(React.forwardRef((props, ref) => {
const createElement = () => {
const otherProps = ObjectUtils.findDiffKeys(props, Tooltip.defaultProps);
const tooltipClassName = classNames('p-tooltip p-component', {
[`p-tooltip-${positionState}`]: true
[`p-tooltip-${getPosition(currentTargetRef.current)}`]: true
}, props.className);
const empty = isTargetContentEmpty(currentTargetRef.current);

Expand Down

0 comments on commit 529c713

Please sign in to comment.