creativetimofficial / ct-vue-black-dashboard-pro

Vue Black Dashboard PRO issues
15 stars 11 forks source link

[Bug] BaseCheckbox isn't working with Array typed v-model / checked prop #37

Open krislyon opened 2 years ago

krislyon commented 2 years ago

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

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.

krislyon commented 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.

BaseCheckbox.zip

rarestoma commented 2 years ago

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