Griddle icon indicating copy to clipboard operation
Griddle copied to clipboard

How to sort a column numerically, not alphabetically?

Open pupsanka opened this issue 10 years ago • 5 comments

I have a column that displays floating number, and the sort is done alphabetically, rather than numerically. I tried to provide an override function with externalChangeSort, but it didn't work, unless useExternal is set to true, but then it requires overriding all methods with external. Is there any way to implement numeric sort? thanks

pupsanka avatar Dec 15 '15 12:12 pupsanka

The ability to add a custom sorting function to the columnMetadata prop would be really great, but I took a quick glance and didn't see anything like that in griddles source.

legomind avatar Jan 09 '16 04:01 legomind

There was a PR for starting similar functionality (date rather than numbers) but it's not in the source right now.

https://github.com/GriddleGriddle/Griddle/pull/149/files

ryanlanciaux avatar Jan 09 '16 05:01 ryanlanciaux

we have the some problem. Please help to add sort column numerically feature. Thanks very much.

standino avatar Feb 22 '16 03:02 standino

Take a look at my PR #382.

Dem0n3D avatar Apr 08 '16 15:04 Dem0n3D

Thank you all for the discussion around this and for the noted PR. We have recently released Griddle 1.0 that has a customSort property on ColumnDefintion. Please see this bit of code in our story definitions for an example of this and the customization docs. Closing this one for now but please feel free to open a new issue if any problems are encountered. :+1:

ryanlanciaux avatar Feb 24 '17 12:02 ryanlanciaux