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

Setting default sort and then sorting first time always sort descending #219

Closed
dana2208 opened this issue Jan 19, 2016 · 3 comments
Closed
Labels

Comments

@dana2208
Copy link
Contributor

Hi,

I am setting a default sorting for my column this way:
<BootstrapTable data={dataSet} striped={true} hover={true} condensed={true} options={sortName: "dispName", sortOrder: Const.SORT_DESC}>
Then, first time I click on the column header of dispName, then the sorting is not changed to ascending but rather is still in descending order. I need to click again in order to get the table sorted ascendingly.
This is due to the fact that TableHeaderColumn uses a local variable (this.order) that is undefined at the beginning and only after the first click it is updated with the current sort order. Instead it should already be aware of the default sorting order.

Thanks

@AllenFang
Copy link
Owner

@dana2208, I'll check it out :) thanks your feedback

@AllenFang AllenFang added the bug label Jan 19, 2016
@AllenFang
Copy link
Owner

@dana2208, I've fixed this issues and will release on next version in these day :)
Thanks 👍

@AllenFang
Copy link
Owner

@dana2208, I've fixed this issues on v1.4.3 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants