-
Notifications
You must be signed in to change notification settings - Fork 758
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
How to use createSliderWithTooltip #856
Comments
@jcubic It looks like this library was refactored recently and the most recent documentation now exists in the |
I don't think I will waste more time on this. |
Can you please let me know how this can be resolved? This is what I have: But this gives the following error: |
@anik95 Since I think that component is the intended replacement for the code you are currently using. |
I literally spent half of a day on this... For anyone who encounter the same problem, my suggestions are:
But if you insist on using this version of import React from "react";
import Slider from "rc-slider"; // 10.0.0
import Tooltip from "rc-tooltip"; // 5.1.1
import "rc-tooltip/assets/bootstrap_white.css";
export default () => (
<div>
<Slider
handleRender={(node, handleProps) => {
return (
<Tooltip
overlayInnerStyle={{ minHeight: "auto" }}
overlay={"score: " + handleProps.value}
placement="bottom"
>
{node}
</Tooltip>
);
}}
range
min={0}
max={10}
defaultValue={[1, 2, 3]}
></Slider>
</div>
); Oh, never to mention that it generates error of Working on this is just WASTE OF TIME. |
The code from the documentation doesn't work. It gives a warning from TypeScript that you can replace require with import but it throws a runtime error:
The text was updated successfully, but these errors were encountered: