Skip to content

Commit 8edc480

Browse files
committed
Fix sort by glboal id
1 parent d75b3ec commit 8edc480

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/GraphQL/loaders/parseClassTypes.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,12 @@ const load = (
339339
const updatedSortFields = {
340340
...sortFields,
341341
};
342+
const value = field === 'id' ? 'objectId' : field;
342343
if (asc) {
343-
updatedSortFields[`${field}_ASC`] = { value: field };
344+
updatedSortFields[`${field}_ASC`] = { value };
344345
}
345346
if (desc) {
346-
updatedSortFields[`${field}_DESC`] = { value: `-${field}` };
347+
updatedSortFields[`${field}_DESC`] = { value: `-${value}` };
347348
}
348349
return updatedSortFields;
349350
}, {}),

0 commit comments

Comments
 (0)