functional-data-grid icon indicating copy to clipboard operation
functional-data-grid copied to clipboard

Server-side Sorting

Open reyronald opened this issue 7 years ago • 2 comments

Hello!

First of all thank you for this wonderful library! I'm planning to use this on one of my projects but there's one use case I am missing and was wondering if it could be added: server-side sorting.

The built-in client-side sorting is not usable for me because I need to sort the data on the server-side, so I need to be able to fire an HTTP request when a column is clicked to fetch my results again instead of having FDG sort them in place. I didn't see anything in the API that would allow me to do this. Is there already a way or is this not supported?

In the case it's not supported, can this be added in? I'm willing to contribute on this if you have no time to implement it yourself and can accept external contributions.

Cheers!

reyronald avatar Nov 20 '18 10:11 reyronald

Hi Rey,

Thank you very much. I hope this library will be useful to you.

I hadn't considered a server-side sorting use case. Without making big modifications to the library we could create an onSort callback that allows the user to fetch the data from the server and prevent the library from doing the sorting

Would it be okay?

energydrink9 avatar Nov 20 '18 13:11 energydrink9

That sounds good yeah :), I think that should be enough. Can't think of any edge cases off the top of my head but I can try the PR for the feature in my app before it's merged just to be sure.

Thanks for replying so quickly!

reyronald avatar Nov 20 '18 15:11 reyronald