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

TooltipFormat With Array v-model #4

Open
recep-yildiz opened this issue Jul 28, 2020 · 2 comments
Open

TooltipFormat With Array v-model #4

recep-yildiz opened this issue Jul 28, 2020 · 2 comments

Comments

@recep-yildiz
Copy link

recep-yildiz commented Jul 28, 2020

As i saw, tooltip can't be formatted with array values.

I have an array like "arr[0, 24]" (v-model="arr")

i need to format it like "0 am - 12 pm", couldn't achieve this

by the way, in events, options.value should be an object, not a string

@soundar24
Copy link
Owner

@ItStark the model supports any kind of type such as number | sting | array. Currently the array type was not defined in the props, so that it might throw the warring when set array value. That I will correct and push a new version.

And through the tooltipFormat you can achieve any custom value, here I have updated a simple demo:

https://codesandbox.io/s/dazzling-bouman-eg8dm?file=/src/components/SliderDemo.vue

Is this the expected one?

Also regarding the options.value type, commonly we maintained the string type only for the value prop. Even what kind of type you passed, it will maintain the string type only. If still you want the value as array then you can get it through a computed property. Can you give more info about your requirement, so that I can suggest a better solution or if needed ll integrate with the source. Thanks...

@recep-yildiz
Copy link
Author

I will achieve just like you said, gonna use computed property for that.

The link you shared is just like i would like to do. Thanks so much.

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