Open divyanshu013 opened 6 years ago
Atm I've gotten around this by using the following code:
import Rheostat from 'rheostat';
<Rheostat
handle={({ className: _, ...handleProps }: HandleProps) => (
<Handle {...handleProps}>
<HandleTooltip>
<DateLabel>
{moment(start)
.add(handleProps['aria-valuenow'], type)
.format('Do MMM')}
</DateLabel>
</HandleTooltip>
</Handle>
)}
...
/>
Note that I'm dipping into the aria tag aria-valuenow
to get the current value, so I can then show it on the handle. It's definitely not how it was intended to be used, but it works. Maybe we can get better custom handle support soon, I'd be willing to contribute.
Hi, great work on rheostat. I'm looking for a way to render a tooltip which would display the current value of the slider while it's being dragged. What would be the best way to achieve this?
Reference - https://github.com/react-component/slider
Thanks!