Bootstrap-vue: b-table works incorrect with 'sortable: false' fields.

Created on 26 Aug 2019  路  1Comment  路  Source: bootstrap-vue/bootstrap-vue

Describe the bug

User can click on column header with 'sortable: false' or on column header, for which sortable was not specified at all and table sorting will be changed.

Steps to reproduce the bug

  1. Go to https://jsfiddle.net/zmvq4dx3/
  2. Click on Id column two times to have descending sorting by Id column header. Then click on "First Name" (which has sortable: false) or "Last Name" (for which sortable was not specified at all) column header
  3. Grid will be sorted not by Id descending

Expected behavior

Grid sorting should be not changed, click on non sortable column header should be ignored.

Versions

Libraries:

  • BootstrapVue: 2.0.0-rc.28

Demo link

https://jsfiddle.net/zmvq4dx3/

Additional context

If something not clear, please, let me know.

Answered Question

Most helpful comment

Clicking on a non-sortable column will clear any active sort:

https://bootstrap-vue.js.org/docs/components/table#sorting

As mentioned in the Fields section above, you can make columns sortable. Clicking on a sortable column header will sort the column in ascending direction (smallest first), while clicking on it again will switch the direction of sorting. Clicking on a non-sortable column will clear the sorting. The prop no-sort-reset can be used to disable this feature.

>All comments

Clicking on a non-sortable column will clear any active sort:

https://bootstrap-vue.js.org/docs/components/table#sorting

As mentioned in the Fields section above, you can make columns sortable. Clicking on a sortable column header will sort the column in ascending direction (smallest first), while clicking on it again will switch the direction of sorting. Clicking on a non-sortable column will clear the sorting. The prop no-sort-reset can be used to disable this feature.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ronjouch picture ronjouch  路  3Comments

hydraheim picture hydraheim  路  3Comments

alvirtuoso picture alvirtuoso  路  3Comments

humblecoder picture humblecoder  路  3Comments

KonradDeskiewicz picture KonradDeskiewicz  路  3Comments