File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 236236 @click.stop =" onCheckboxClicked(row, index, $event)"
237237 class =" vgt-checkbox-col"
238238 >
239+ <template
240+ v-if =" hasCheckboxColumnTemplate "
241+ slot="table-checkbox-column"
242+ slot-scope="props"
243+ >
244+ <slot
245+ name =" table-checkbox-column"
246+ :row =" props.row"
247+ >
248+ </slot >
249+ </template >
250+
239251 <input
252+ v-else
240253 type =" checkbox"
241254 :disabled =" row.vgtDisabled"
242255 :checked =" row.vgtSelected"
@@ -603,6 +616,13 @@ export default {
603616 );
604617 },
605618
619+ hasCheckboxColumnTemplate (){
620+ return (
621+ !! this .$slots [' table-checkbox-column' ] ||
622+ !! this .$scopedSlots [' table-checkbox-column' ]
623+ );
624+ }
625+
606626 showEmptySlot () {
607627 if (! this .paginated .length ) return true ;
608628
@@ -849,7 +869,7 @@ export default {
849869 const column = this .getColumnForField (srt .field );
850870 const xvalue = this .collect (xRow, srt .field );
851871 const yvalue = this .collect (yRow, srt .field );
852-
872+
853873 // * if a custom sort function has been provided we use that
854874 const { sortFn } = column;
855875 if (sortFn && typeof sortFn === ' function' ) {
You can’t perform that action at this time.
0 commit comments