-
-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createSliderWithTooltip not working/Can't get tooltips to work in v10 #839
Comments
Yes, I'm encountering the same |
Yeah, the documentation is obsolete now! |
Same, the docs are no longer accurate |
Was the |
Good question. |
I was able to get the tooltip working with this example but can't seem to figure out how to get them working correctly with a range slider. |
Solution could be: #825 (comment) |
For a result very similar to previous versions, with hover and focus display, handling of multiple values, you can use this code : In a CSS file : .rc-slider [data-slider-tooltip]::before,
.rc-slider [data-slider-tooltip]::after {
position: absolute;
top: -6px;
left: 50%;
display:none;
}
.rc-slider [data-slider-tooltip]::before {
content: "";
transform: translateX(-50%);
border-width: 4px 6px 0 6px;
border-style: solid;
border-color: rgba(0,0,0,0.7) transparent transparent transparent;
}
.rc-slider [data-slider-tooltip]::after {
content:attr(data-slider-tooltip);
transform: translateX(-50%) translateY(-100%);
background: rgba(0,0,0,0.7);
text-transform:none;
color: #fff;
font-size: 12px;
border-radius: 5px;
pointer-events: none;
padding: 4px 4px;
}
.rc-slider:active [data-slider-tooltip]::before,
.rc-slider:active [data-slider-tooltip]::after,
.rc-slider-handle:hover [data-slider-tooltip]::before,
.rc-slider-handle:hover [data-slider-tooltip]::after {
display:block;
} In your jsx code : <Slider
handleRender={ renderProps => (
<div { ...renderProps.props }>
<div data-slider-tooltip={ renderProps.props["aria-valuenow"] }/>
</div>
) }
/> It will look like this : |
Hi, I am having major issues gettin the Tooltip to work on a range slider. I have tried following examples and other "solutions" but they all seem to have a problem with the latest version? Not sure if I am missing anything obvious...
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: