Sorting on the server
See original GitHub issueIt would be nice to add functionality to implement sorting on the server, something like that:
model.page(1).sorting({ name: 'desc' }).fetch() => ?page=1&sort=name&order=desc
or set all query params
model.queryParams({ page: 1, sort: 'name', order: 'desc' }).fetch() => ?page=1&sort=name&order=desc
it would be convenient to use with route
{ params: this.$route.query }
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Server-Side and Client-Side Sorting and Filtering
When server-side filtering or sorting is performed, the application sends a query that is a modification of the starting query to the server....
Read more >Sorting on the server or on the client? - Stack Overflow
First off, the database may already have indexes on the fields you want so it may be trivial for it to retrieve data...
Read more >A server side external sorting and filtering example #2033
I myself was struggling with implementing a server-side sorting (data were a query to postgres) and came up with a solution that works...
Read more >Server Side Sorting - SoftFluent
Server side sorting should be preferred in almost all cases to client side sorting, since server side sorting is handled in the data...
Read more >serverSorting - API Reference - Kendo UI DataSource
By default, the data source performs sorting client-side. By default, the sort is sent to the server following jQuery conventions.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you wanted to fetch a paginated collection with some sorting parameters, you could do it like this:
This in on Model:
What you could do is override
setErrors
, or we could implement a method likegetValidationErrors(error)
that might be a more appropriate override?