Skip to content

Commit

Permalink
fix: slider: ensure default behavior of tooltip does not hide on refe…
Browse files Browse the repository at this point in the history
…rence click
  • Loading branch information
dkilgore-eightfold committed Jun 6, 2023
1 parent ed0c067 commit a17d266
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ export const Slider: FC<SliderProps> = React.forwardRef(
styles.sliderTooltip,
tooltipProps?.classNames,
])}
closeOnReferenceClick={false}
content={getTooltipContentByValue(val)}
key={`value-tooltip-${index}`}
offset={thumbGeometry().diameter + THUMB_TOOLTIP_Y_OFFSET}
Expand Down
1 change: 1 addition & 0 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export const Tooltip: FC<TooltipProps> = React.memo(
}
if (
!closeOnReferenceClick &&
referenceElement &&
!referenceElement.contains(e.target as Node)
) {
toggle(false)(e);
Expand Down

0 comments on commit a17d266

Please sign in to comment.