-
-
Notifications
You must be signed in to change notification settings - Fork 836
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
Use Vue.util.mergeOptions to merge default options with user's options #5
Comments
Thanks! |
I've looked into mergeOptions(), but as far as I understand it, it is for merging vue instance options if they conflict with mixins.
So its not merging simple javascript objects. However it's a good idea to extend the defaultOptions. I will work on that. But I don't really see a reason for the override property. You always overwrite if you are merging. And you will never get a 'clean' chart, because chartjs sets defaultValues, too. |
Yeah I should have taken a closer look. for the most part, it would work but it would lead to unexpexetd behaviour when using certain vue-releated key names. You could e.g. use |
This would allow users to override parts of the defaults without having to copy the rest of the defaults into their component to preserve them.
It would also be possible to introduce a 3rd argument as a flag to decide weither to override or not:
The text was updated successfully, but these errors were encountered: