Fix collections not showing when setting the relation

This commit is contained in:
ernstmul committed 2025-05-22 15:17:05 +02:00
1 parent 0fc1c5379b
commit 634d21e70f
1 file changed
+4 -4
@@ -89,11 +89,11 @@
let way = 'one';
// Lifecycle hooks
async function getCollections(search: string = null) {
const queries = search ? [Query.orderDesc('')] : [Query.limit(100)];
async function getCollections() {
const queries = [Query.limit(100)];
return sdk
.forProject(page.params.region, page.params.project)
.databases.listCollections(databaseId, queries, search);
.databases.listCollections(databaseId, queries);
}
function updateKeyName() {
@@ -110,7 +110,7 @@
});
// Reactive statements
$: getCollections(search).then((res) => (collectionList = res));
$: getCollections().then((res) => (collectionList = res));
$: collections = collectionList?.collections?.filter((n) => n.$id !== $collection.$id) ?? [];
$: if (editing) {