Custom Bulk Checkboxes with Vue JS

 A few weeks ago I was doing this table that a user can execute bulk actions on selective rows. After minutes of unsuccessful searches, I hastily decided to come up with a custom component called FormCheckboxes. 

FormCheckboxes.vue

This component receives a string id as a prop as well as a boolean master for the master checkbox. Underneath, it uses Bootstrap-Vue's BFormCheckbox which is very robust compared to HTML input checkbox.


This component is self-fulfilling in that it's the master as well as servant, not separate imports. Communication between the components is via events and data is stored centrally in Vuex Store.


This can be further extended to add flair for an indeterminate selection but that's an awesome Todo on your end.


That's all for today guys.

Comments

Popular Posts