-
Notifications
You must be signed in to change notification settings - Fork 782
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
Change the sorting behavior #220
Comments
@dana2208, I thinks it's hard to give some hook for you without touching source code. But I can accept a new feature for your case, just perform sorting as If ok, PR is welcome; otherwise, I prefer to fix bug and some important feature first |
if another question, welcome to join gitter to discuss |
OK I'll do a PR. Thank you! |
This is a little dated, but I was looking for a way to do something similar to this and found that there are currently no plans to implement this feature through options. However, I figured out that it can be achieved with the existing API. I just wanted to flip the default sort direction from 'desc' to 'asc'. Using Initialize my state in the constructor:
Give the
Define
Giving it a third/none state should be fairly trivial to add this this if you're familiar with component state. All that being said, I do think there should be an easier way to do this - probably with an options object. Hope this helps someone. |
@alanqthomas, thanks your feedback, Currently I'm busy on my work, and focus on the development of thanks |
@AllenFang & @dana2208 I could be wrong, but is is not just a case of changing this line to also allow it to set the https://github.com/AllenFang/react-bootstrap-table/blob/master/src/TableHeaderColumn.js#L28 |
@Siyfion, I thinks it's not just this line, I need to check overall for the sorting behavior, and this is not urgent issue for me currently and really busy... sorry. Anyway, PR is welcome |
Hi, I am unable to setState in the function for onSelect. onSelect: this.handleRowSelect handleRowSelect(row, isSelected, e){ Getting error because I am unable to access state. Any thoughts ? I am using "react": "^16.3.2", Please advise. |
Hi,
I would like to be able to do this:
Is there a way to hook the actual sorting behavior, i.e. write my own function in my code without touching the source code?
The text was updated successfully, but these errors were encountered: