Skip to content

Commit

Permalink
Added forceVisible parameter to tipProps.
Browse files Browse the repository at this point in the history
If need always to show toolTip value.
  • Loading branch information
Ihor Oziian committed Dec 26, 2017
1 parent db32618 commit 99038c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/createSliderWithTooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default function createSliderWithTooltip(Component) {
prefixCls = 'rc-slider-tooltip',
overlay = tipFormatter(value),
placement = 'top',
forceVisible = forceVisible || false,
...restTooltipProps,
} = tipProps;

Expand All @@ -49,9 +50,10 @@ export default function createSliderWithTooltip(Component) {
prefixCls={prefixCls}
overlay={overlay}
placement={placement}
visible={!disabled && (this.state.visibles[index] || dragging)}
visible={(!disabled && (this.state.visibles[index] || dragging)) || forceVisible}
key={index}
>

<Handle
{...restProps}
style={{
Expand Down

0 comments on commit 99038c8

Please sign in to comment.