vue2-datatable icon indicating copy to clipboard operation
vue2-datatable copied to clipboard

Support Boostrap 4 in settings menu

Open drount opened this issue 6 years ago • 4 comments

drount avatar Mar 12 '18 16:03 drount

https://github.com/OneWayTech/vue2-datatable/issues/77

kenberkeley avatar Mar 13 '18 14:03 kenberkeley

I would also prefer a bootstrap4 compatible version, as I do not want to depend on old bootstrap3 for new projects, as well as I understand that bootstrap3 is still in use by many projects.

maltere avatar Mar 14 '18 13:03 maltere

make a different branch (bs4) would be better?

kenberkeley avatar Mar 14 '18 13:03 kenberkeley

It seems like this could be supported by adding a named/scoped slot, so that HeaderSettings could be turned off and an alternate implementation could be provided using whatever ui framework the user chooses, for example:

<div v-if="$slots.default || $slots['customHeaderSettings'] || HeaderSettings" class="clearfix" style="margin-bottom: 10px">
    <header-settings v-if="HeaderSettings" class="pull-right" :columns="columns" :support-backup="supportBackup">
    </header-settings>
    <slot />
    <slot name="customHeaderSettings" :columns="columns" :support-backup="supportBackup"
    </slot>
</div>

JsFiddle showing how a template could be provided in the named/scoped slot:
https://jsfiddle.net/g5oc1rgq/128/

roszell avatar Mar 14 '18 18:03 roszell