Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sortable column breaks starting in v1.17.0 #5217

Closed
mikewertheim opened this issue Jul 29, 2020 · 3 comments · Fixed by #5222
Closed

sortable column breaks starting in v1.17.0 #5217

mikewertheim opened this issue Jul 29, 2020 · 3 comments · Fixed by #5222
Labels
Bug Issues which are marked as Bug confirmed Issues that have been confirmed with a reduced test case and identify a bug.

Comments

@mikewertheim
Copy link

mikewertheim commented Jul 29, 2020

Bootstraptable version(s) affected:
The issue happens in 1.17.0 and 1.17.1. (It works fine in 1.16.0.)

Description

Some sortable columns are unable to sort

Example
The web site that demonstrates the problem is at the URL: http://www.showskimmer.com/?t=Pixar+movies&btv=1.17.1
Note that you can specify the version of bootstrap-table in the "btv" parameter. If that parameter is omitted, it defaults to 1.16.0, which is the working version.

To reproduce the problem... Note that the table has 3 sortable columns: Year, Rating and Title. The Rating and Title columns work fine. If you click the Rating column header twice, the table will respond by being sorted on the ratings in ascending order on the first click and descending order on the second click. Similarly, if you click the Title column header twice, the table will respond by being sorted on the titles in ascending order on the first click and descending order on the second click. But, if you click the Year column header twice, the first click sorts the table by year in ascending order, and the second click makes all of the sort column headers unresponsive (which is the bug).

I have reproduced this bug on the most recent versions of Safari/Mac, Chrome/Windows and Firefox/Windows.

@mikewertheim mikewertheim added the Bug Issues which are marked as Bug label Jul 29, 2020
@UtechtDustin
Copy link
Collaborator

Hey @mikewertheim, thanks for the detailed issue description.
Please provide us the example using our Editor, so we can clearly see which options do you use and how the data looks.

@UtechtDustin UtechtDustin added the needs example Need an example in order to confirm the issue or the PR. label Jul 29, 2020
@mikewertheim
Copy link
Author

@UtechtDustin This mostly reproduces the problem -- https://live.bootstrap-table.com/code/mikewertheim/4160
The difference between the stripped-down version at this link and the full version on showskimmer.com is: In the stripped-down version, the second click on the Year header just causes the Year column header to become unresponsive to further clicks. In the full version on showskimmer.com, the second click on the Year header causes all 3 column headers to become unresponsive to further clicks.

@UtechtDustin UtechtDustin added confirmed Issues that have been confirmed with a reduced test case and identify a bug. and removed needs example Need an example in order to confirm the issue or the PR. labels Jul 29, 2020
@UtechtDustin
Copy link
Collaborator

@mikewertheim
As workaround until the bug is fixed, you can use the field column option.
Example: https://live.bootstrap-table.com/code/UtechtDustin/4162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues which are marked as Bug confirmed Issues that have been confirmed with a reduced test case and identify a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants