-
-
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
"Module '"rc-slider"' has no exported member 'Range'." #825
Comments
This seems to work, however now the |
Something like: |
Same for all the range-only properties, which are now optional. These properties should be |
onChange still has error. Any idea on how to type it?
|
I solved it on my side by just casting the type
|
@hilo2120 Looks like you are passing the state set action as an onchange event handler. You need to write a handleChange function that will call the state setter.
@Ashvin-Pal would make Typescript useless because we're still guessing the type. You could also check if the input is an Array and depend your typings on that result. But both are workarounds and should be fixed by a change in the typings based on the |
@fvoordeckers yeap I had no choice but to use a workaround for now. |
@Ashvin-Pal or someone else. Hello, I can't figure how to display the tooltip in version 10. Any idea ? |
You can check out the example over here > https://codesandbox.io/s/lzsr20?file=/App.tsx |
Thanks, I finally went down to the previous version as it was kind of urgent. And finally it seems easier with the previous version ! |
@Ashvin-Pal Hi, I am having trouble with getting the tooltips working in v 10 using typescript. I found you example which seems like it would have fixed the issue, but it's currently not working and complaining about tipprops? Any idea what would be needed to get it working again? |
Attempted to upgrade but hit the same snag, agreed changing ValueType to something like fvoordeckers said would resolve the issue: range extends true ? number[] : number |
better use npm i rc-slider@9.6.5 |
You must do imports like this import Slider from "rc-slider"; After that Range can accept the props. |
I tried this with the latest version (10.1.0) and this does not seem to work:
Searching for |
Check out this demo with source code http://react-component.github.io/slider/?path=/story/rc-slider--handle |
@dotjsNet Have you tried this outside of the https://github.com/react-component/slider repository with the latest version of If I ignore the typing by casting
I suspect the code on http://react-component.github.io/slider/?path=/story/rc-slider--handle runs <v10. Here is the commit that removes |
so a new non-beta major release introduced breaking changes and yet the documentation has not been updated, and it looks like the vast majority of PRs merged in this repo are not even reviewed. i'm sorry but this screams "shitty library". i'm out. |
EDIT: PR Approved, Thanks ! PR made |
@szamanr - have you found a decent alternative range slider? |
@princefishthrower no, i've pinned the dependency to |
Found yet another slider component: https://github.com/n3r4zzurr0/react-range-slider-input but this one doesn't have types. Just found this nice blog post, at this point I'll accept a completely custom one, tired of searching for a library for such simple functionality: https://benhoneywill.com/building-a-range-slider-component-in-react/ |
it seems that the examples are updated to the new version see /demo/handle |
@TimoWestland about though there is a bug there.. since the |
Probably you have found an alternative way to achieve the requirement, posting this if someone is still looking for a solution... You cannot create a range slider like this in the new versions although the documentation states this way. However, if you must create a custom handle with the tooltip, I suggest using |
FYI, like others in other issues, I finally chose another library last week. I looked at a few different options and Mantine was a good match for us.
|
☝️ mantine looks interesting, note to self to have a look. |
import { Range } from 'rc-slider';
=> error: "Module '"rc-slider"' has no exported member 'Range'."
after upgrading to "rc-slider": "^10.0.0-alpha.6"
doc still says you can import Range from rc-slider.
forced to rollback.
The text was updated successfully, but these errors were encountered: