vue-good-table icon indicating copy to clipboard operation
vue-good-table copied to clipboard

header checkbox template and row checkbox template

Open riazXrazor opened this issue 7 years ago • 5 comments
trafficstars

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

riazXrazor avatar Nov 16 '18 08:11 riazXrazor

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>

riazXrazor avatar Nov 16 '18 08:11 riazXrazor

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.

mstojanovv avatar Apr 11 '19 18:04 mstojanovv

I didn't noticed the conflicts until i saw ur message will resolve it, thanks

riazXrazor avatar Apr 12 '19 04:04 riazXrazor

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'];
    },

xaksis avatar May 01 '19 14:05 xaksis

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.

alexcroox avatar Feb 16 '21 08:02 alexcroox