GerkinDev/vuejs-datatable

Sorting on header doesn't work (only icon) in latest version.

Closed this issue ยท 1 comments

Hello.

I'm using the alpha7 with vue 2.5.17 in a Laravel Nova instance.

Should I do something specific so that the click-on-header sorting should work?
I think I'm doing something wrong because I always have the glyphicons even if the vuejs-datatable doesn't have it anymore.

Definitions:

import { VuejsDatatableFactory } from 'vuejs-datatable';
Vue.use(VuejsDatatableFactory)

<datatable class="table-potentials" v-if="dataPotentials.length > 0" :columns="columns" :data="dataPotentials" :filter-by="filter"></datatable>

columns: [
               { field: 'product_group', label: 'Product Group', sortable: true, filterable: true, headerAlign: 'center', align: 'center'},
               { field: 'product_name', label : 'Product SubGroup', sortable: true},
               { field: 'potential', label    : 'Potential' , sortable: true},
               { field: 'yes_no', label       : 'Accessible' , sortable: true},
               { field: 'reason_why', label   : 'If not, why?', sortable: true},
               { field: 'pcomments', label    : 'Product Group Comments', sortable: false},
 ]

Does anybody have, at least, a hint?

Hi,

There are no glyphicons anymore, simply plain HTML chars as defined here. See ๐Ÿ“‹ the tutorials about customization.

Also, you're using the wrong property for filtering, as demonstrated in both ๐Ÿ“‹ the basic tutorial and ๐Ÿ“š the API docs.

Feel free to reopen if you still have issues.