vue-good-table
vue-good-table copied to clipboard
header checkbox template and row checkbox template
Hi, I have added a little feature which I required for my project, template for the checkbox in header and row, so that I can use material checkbox design,
thank you, Riaz
this is how i am using
<template slot="table-checkbox-column" slot-scope="props">
<span @click="props.toggle">
<input type="checkbox" :id="'basic_checkbox_header'" class="filled-in" :checked="props.checked" />
<label for="'basic_checkbox_header'"></label>
</span>
</template>
<template slot="table-checkbox-row" slot-scope="{ row }">
<span>
<input type="checkbox" :id="'basic_checkbox_'+row.id" class="filled-in" :checked="row.vgtSelected" />
<label for="'basic_checkbox_'+row.id"></label>
</span>
</template>
Great PR, hopefully, the conflicts can be resolved so the PR can be merged, ATM it's very hard to style the checkboxes e.q. implement Bootstrap 4 custom checkbox design because the checkboxes don't have any wrapper nor label, only single input.
I didn't noticed the conflicts until i saw ur message will resolve it, thanks
the following is always returning true in table header even when there is no slot provided.
hasCheckboxTemplate() {
return !!this.$slots['table-checkbox-column']
|| !!this.$scopedSlots['table-checkbox-column'];
},
Any movement on this PR? I'd like to use my own checkbox component in order to match the rest of my design but cannot without a slot.