GerkinDev / vuejs-datatable

A Vue.js component for filterable and paginated tables.
https://gerkindev.github.io/vuejs-datatable/
MIT License
172 stars 44 forks source link

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

Closed tudorradubarbu closed 3 years ago

tudorradubarbu commented 3 years ago

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?

GerkinDev commented 3 years ago

Hi,

There are no glyphicons anymore, simply plain HTML chars as defined here. See :clipboard: the tutorials about customization.

Also, you're using the wrong property for filtering, as demonstrated in both :clipboard: the basic tutorial and :books: the API docs.

Feel free to reopen if you still have issues.