-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Comments
If you want to fully control the sorting algorithm, you will need to treat
the table as a server side setup. See
https://react-table.js.org/?selectedKind=2.%20Demos&selectedStory=Server-side%20Data&full=0&down=0&left=1&panelRight=0&downPanel=kadirahq%2Fstorybook-addon-actions%2Factions-panel
I may possibly make the sorting customizable more easily
…On Wed, Jan 25, 2017 at 12:45 AM Sam Simmons ***@***.***> wrote:
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?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#40>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AFUmCZjWbsLFoe0ofBgmscFQFtTzNbH9ks5rVv2AgaJpZM4LtL83>
.
|
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
Hey, I'm having some trouble implementing custom sorting. Say I have a component
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 useonSortingChange
, but I can't figure out how to use it properly. Any chance you could point me in the right direction?The text was updated successfully, but these errors were encountered: