glittershark / reactable

Fast, flexible, and simple data tables in React
glittershark.github.io/reactable
MIT License
1.51k stars 222 forks source link

#309 provide row values to sortFunction #321

Closed cklab closed 6 years ago

cklab commented 8 years ago

1) add .idea to gitignore 2) provide the values to be sorted to the custom sort functions to allow for further customization, allowing use of values from multiple columns to affect the sort.

cklab commented 7 years ago

rebased

coreylight commented 7 years ago

@cklab could you just use the parent object in the value prop? Instead of

<Td column="timestamp" value={inv.timestamp}>

doing

<Td column="timestamp" value={_.clone(inv)}>

?

cklab commented 7 years ago

@coreylight That hadn't crossed my mind, actually. I just gave your suggestion a whirl and, while it works for sorting, it seems to break filtering.