Skip to content
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

Passing props to customLabel #237

Open
eulerkochy opened this issue Jun 21, 2021 · 1 comment
Open

Passing props to customLabel #237

eulerkochy opened this issue Jun 21, 2021 · 1 comment

Comments

@eulerkochy
Copy link

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.

@SyedTayyabUlMazhar
Copy link

You just need to do this:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants