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
[Feature] Custom sorting on column based on value #1038
Comments
This might be far from a proper patch, but it works. For starters, Im passing the value to the delegate, not valueForSorting, as callers would expect data in the same format they set in the grid, is this desired? Any comments, suggestions? pluto_column.dart
column_state.dart
Now, I can do : |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
I have some values that are members of an enum on the server side, I send them to the client as the string representation, so flutter can simply display it on a PlutoGrid, but sorting is broken, since I don't want them to be sorted alphabetically,
I could use a PlutoColumnValueFormatter and change my underlying data type to int and convert to text on the client side, but I would love to have a way to simply override how sorting is applied to a column.
I can think of many reasons this would be useful.
One way this could be done is: take a delegate the will be called with the cell value, and must return an int, then the sorting will be applied on the int value behind the scenes.
i.e.
The text was updated successfully, but these errors were encountered: