reactabular / easy

Easy, opinionated wrapper for Reactabular (MIT)
https://www.npmjs.com/package/reactabular-easy
MIT License
3 stars 3 forks source link

Multiple values in a cell and specify which value to use for sorting #5

Open nextofsearch opened 7 years ago

nextofsearch commented 7 years ago

Hi,

If I have a table with multiple values in a cell can I specify which value (i.e. hidden input) to use for sorting?

bebraw commented 7 years ago

Hi,

Sorting is per column. What kind of sort are you looking for exactly? Can you give an example?

nextofsearch commented 7 years ago

@bebraw Thanks for responding.

Please check out this image. The cell has 2 values: one is an original value and the other is a variation compared to control group. The current implementation is done using jQuery dataTable and I am searching for an alternative since it is not compatible with React. The way I did with dataTables is adding a number using input tag as hidden and set sorting to be done with the input tag in the cell, not just any number.

bebraw commented 7 years ago

Check sortabular carefully. Maybe one of those would work. Especially multi-column sort was designed for more complex cases.

I'm not sure if I got the variation idea right but it should be possible to tweak the behavior to match your requirements.