[#5641] changed the relation picker default sort to use rowid instead of created

This commit is contained in:
Gani Georgiev
2024-10-10 16:24:19 +03:00
parent 830e818eb7
commit 6a9784258f
29 changed files with 95 additions and 83 deletions

View File

@@ -159,9 +159,14 @@
const fallbackSearchFields = CommonHelper.getAllCollectionIdentifiers(collection);
let sort = "";
if (!isView) {
sort = "-@rowid"; // all collections with exception to the view has this field
}
const result = await ApiClient.collection(collectionId).getList(page, batchSize, {
filter: CommonHelper.normalizeSearchFilter(filter, fallbackSearchFields),
sort: !isView ? "-created" : "",
sort: sort,
fields: "*:excerpt(200)",
skipTotal: 1,
expand: getExpand(),