Commit b84f953
Allow sorting by
When attempting to sort by the `createdAt` column, we would still apply
the default sort ordering of `-createdAt`, meaning that we would specify
a sort order of `createdAt,-createdAt`. When Parse-Server gets a sort
order in which the same field appears more than once, it will use the
last entry for the field in its sorting. This means that the sort the
user has selected is overwritten by the default sort we apply.
We now check to see if the sort we are applying is already on the
`createdAt` field, and if so we do not apply the default ordering.
Fixes #447.createdAt ascending (#508)1 parent ec68096 commit b84f953
1 file changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
306 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
307 | 310 | | |
308 | | - | |
| 311 | + | |
309 | 312 | | |
310 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
| |||
0 commit comments