react-native-multi-slider icon indicating copy to clipboard operation
react-native-multi-slider copied to clipboard

Passing props to customLabel

Open eulerkochy opened this issue 4 years ago • 1 comments

Is there a way to pass a user-defined prop to a customLabel? If so, what should be written? Using this,

<Multislider
.
.
enableLabel
customLabel={() => (<CustomLabel myProp={some_value} />)}
.
.
/>

the label is not getting rendered on pressing the markers.

eulerkochy avatar Jun 21 '21 15:06 eulerkochy

You just need to do this:

customLabel={(props) => (<CustomLabel {...props} myProp={some_value} />)}

SyedTayyabUlMazhar avatar Sep 16 '21 09:09 SyedTayyabUlMazhar