I need to use tipFormatter to show value in % so I use createSliderWithTooltip extention. But I don't know how to manage visibiltiy of tip.
In such case I can only transfer the tipProps={聽placement: 'top',聽prefixCls: 'rc-slider-tooltip',聽overlay: tipFormatter(value)聽} and can't set visibility...
Thanks in advance for any help!
@matveychuk
I think there is no solution with tooltip. But you can use following method, it works for me.
<Slider
step={10}
defaultValue={50}
min={10}
max={120}
handle={(props) => {
// Custom Tooltip
return (
<span className={props.className} style={{ left: props.value+'%' }}>
{props.value}
</span>
)
}}
/>
Perhaps a little late, but an unrelated search led me to this.
Here is my solution.
import { Range, createSliderWithTooltip } from 'rc-slider'
const Ranger = createSliderWithTooltip(Range);
class CompSlider .....
....
....
<Ranger
tipProps={
{
visible: true
}
}
...other props...
/>
....
Most helpful comment
Perhaps a little late, but an unrelated search led me to this.
Here is my solution.