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

Enable values array to contain objects with metadata #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nlively
Copy link

@nlively nlively commented Nov 5, 2019

This PR allows values to be passed as an array of objects. As long as an object has a value property, the value property will be used to position the handle, and the rest of the object will be available as metadata. Metadata is available when rendering handles. Useful for specifying CSS classes, rendering custom tooltips and color coding handles

@sghall
Copy link
Owner

sghall commented Nov 7, 2019

Hey. Thanks for making this PR. I like the idea. Just scanning it, I'm thinking the Typescript support might be an issue with the any.

This part:

values: ReadonlyArray<any>

Do you use Typescript? Thinking we need to provide a way to pass a generic so it's type safe. I know there's quite a few TS users of this library. Anyway, I'll take a look at this more closely when I have a moment.

@nlively
Copy link
Author

nlively commented Nov 12, 2019

@sghall, I'm probably not the best guy to incorporate typescript since that's outside my core competency. Perhaps someone else wants to pick up where I left off?

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

Successfully merging this pull request may close these issues.

None yet

2 participants