added simple loose wildcard search term support in the Admin UI

This commit is contained in:
Gani Georgiev
2023-04-14 14:37:51 +03:00
parent 25769e971a
commit 53c735d00b
36 changed files with 182 additions and 130 deletions
+3 -1
View File
@@ -125,10 +125,12 @@
listSort = parts.join(",");
}
const fallbackSearchFields = CommonHelper.getAllCollectionIdentifiers(collection);
return ApiClient.collection(collection.id)
.getList(page, 30, {
sort: listSort,
filter: filter,
filter: CommonHelper.normalizeSearchFilter(filter, fallbackSearchFields),
expand: relFields.map((field) => field.name).join(","),
$cancelKey: "records_list",
})
@@ -132,8 +132,10 @@
try {
const page = reset ? 1 : currentPage + 1;
const fallbackSearchFields = CommonHelper.getAllCollectionIdentifiers(collection);
const result = await ApiClient.collection(collectionId).getList(page, batchSize, {
filter: filter,
filter: CommonHelper.normalizeSearchFilter(filter, fallbackSearchFields),
sort: !collection?.$isView ? "-created" : "",
$cancelKey: uniqueId + "loadList",
});