feat: all results are in desc order

This commit is contained in:
Arman committed 2022-10-07 14:30:40 +02:00
1 parent 2b9e81da17
commit 239df58cad
5 files changed
+24 -5

No files matched your search

@@ -21,7 +21,10 @@
await goto(`${base}/console/project-${project}/databases/database/${event.detail.$id}`);
};
$: databaseList.load([Query.limit($cardLimit), Query.offset(offset)], search);
$: databaseList.load(
[Query.limit($cardLimit), Query.offset(offset), Query.orderDesc('$createdAt')],
search
);
</script>
<Container>
@@ -23,7 +23,11 @@
);
};
$: collections.load(databaseId, [Query.limit($cardLimit), Query.offset(offset)]);
$: collections.load(databaseId, [
Query.limit($cardLimit),
Query.offset(offset),
Query.orderDesc('$createdAt')
]);
</script>
<Container>
@@ -24,7 +24,11 @@
const projectId = $page.params.project;
const databaseId = $page.params.database;
$: documentList.load(databaseId, $collection.$id, [Query.limit(5), Query.offset(offset)]);
$: documentList.load(databaseId, $collection.$id, [
Query.limit($pageLimit),
Query.offset(offset),
Query.orderDesc('$createdAt')
]);
$: columns = [
...$collection.attributes.map((attribute) => ({
key: attribute.key,
@@ -21,7 +21,11 @@
await goto(`${base}/console/project-${project}/storage/bucket/${event.detail.$id}`);
};
$: bucketList.load([Query.limit($cardLimit), Query.offset(offset)]);
$: bucketList.load([
Query.limit($cardLimit),
Query.offset(offset),
Query.orderDesc('$createdAt')
]);
</script>
<Container>
@@ -72,7 +72,11 @@
}
};
$: files.load(bucket, [Query.limit($pageLimit), Query.offset(offset)], search);
$: files.load(
bucket,
[Query.limit($pageLimit), Query.offset(offset), Query.orderDesc('$createdAt')],
search
);
$: if (search) offset = 0;
</script>