Open Bernabe-Felix opened 5 years ago
@Bernabe-Felix The problem is a boolean
is being passed as the dragging
prop, when it is asking for a string. A temporary fix that we found is to wrap Handle in a function that returns it with a modified dragging
prop. Something like this can be incorporated into a component:
import Slider, { Handle } from 'rc-slider';
const HandleWrapper = props => {
const { dragging, ...restProps } = props;
return (
<React.Fragment>
<Handle dragging={dragging.toString()} {...restProps} />
</React.Fragment>
);
};
... a lot of code skipped ...
<Slider
handle={HandleWrapper}
/>
I'm getting similar error with version 8.7.0 for reverse attribute
Take a look at line: const { dragging, ...restProps } = props;
.
props
should be unwrapped instead of passing them directly like: <Handle dragging={props.dragging.toString()} {...props} />
In the other words, you can't skip const { dragging, ...restProps } = props;
.
but now when you do that you get the following error , looks like the types are wrong and not expecting dragging , if i don't put it it works fine the types don't complain but on the console we get that error
Handle
is passing a boolean property to the generateddiv