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

Sorting help #40

Closed
SamSimmons opened this issue Jan 25, 2017 · 2 comments
Closed

Sorting help #40

SamSimmons opened this issue Jan 25, 2017 · 2 comments

Comments

@SamSimmons
Copy link

Hey, I'm having some trouble implementing custom sorting. Say I have a component

const BigTable = (props) => {
  let { data } = props
  return (
    <ReactTable
      data={data}
      columns={columns}
    />
  )
}

If I had an age column, that was a string, and I wanted to use a function like (a, b) => parseInt(a) - parseInt(b) to sort the data. From the docs I've been trying to set the table to manual use onSortingChange, but I can't figure out how to use it properly. Any chance you could point me in the right direction?

@tannerlinsley
Copy link
Collaborator

tannerlinsley commented Jan 25, 2017 via email

@atlanteh
Copy link
Contributor

Any update regarding customizing the search? I have a getter that shows some date as a formatted string, but I want the sorting to be done by the actual date value..

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

No branches or pull requests

3 participants