Open krislyon opened 2 years ago
Attached is a fix for the issue that contains both a patch file and the updated BaseCheckbox.vue.
The fix was to create a value prop on the vue component that accepts Strings or Numbers and bind it to the contained input checkbox element.
Hi @krislyon,
Thank you for working with our products and for fixing this issue.
We just added it to the 'to do' list for the next update.
Best regards, Rares
Version
Latest
Reproduction link
https://github.com/creativetimofficial/ct-vue-black-dashboard-pro
Operating System
Windows 10
Device
PC
Browser & Version
Chrome 96.0.4664.110
Steps to reproduce
What is expected?
Non-Custom Checkbox controls in vue may be bound to Array data using v-model, and their 'value' prop will be added to the array when checked. I expect the BaseCheckbox to behave the same. Both its code and the documentation appear to imply that the checked prop may use an Array.
What is actually happening?
If an Array data field is bound using v-model a null value is added to the array.
If an Array data field is bound using :checked, nothing happens.
Solution
Additional comments
It appears the implementation of BaseCheckbox was incomplete, and support for Array binding was not fully implemented.