Skip to content
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

Server-side Sorting #19

Open
reyronald opened this issue Nov 20, 2018 · 2 comments
Open

Server-side Sorting #19

reyronald opened this issue Nov 20, 2018 · 2 comments

Comments

@reyronald
Copy link
Contributor

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!

@energydrink9
Copy link
Owner

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?

@reyronald
Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants