react-native-data-table icon indicating copy to clipboard operation
react-native-data-table copied to clipboard

Sort rows based on Header selection

Open ShaikhKabeer opened this issue 6 years ago • 3 comments

Hello everyone,

I have used react-native-table in my app. I'm displaying lots of data in the table. Now how do I achieve the data in order (ascending/descending) based on header selection. I tried with isAscending={true} but it's not working here. please help.

ShaikhKabeer avatar Feb 24 '18 07:02 ShaikhKabeer

Any solution for this one ?

ShaikhKabeer avatar Mar 01 '18 09:03 ShaikhKabeer

Any solution for this @Chris-Petty @andreievg ?

ShaikhKabeer avatar Mar 07 '18 15:03 ShaikhKabeer

Our docs are still lacking and likewise for examples.

We have no straight forward example that I can give, but you need to write a function that sorts the data according to column/isAscending. Here is not a simple example with a bit abstraction going on (sorry): https://github.com/sussol/mobile/blob/master/src/pages/StockPage.js#L43-L65

Chris-Petty avatar Mar 12 '18 01:03 Chris-Petty