Activate pagination for collections with page size of 100 items

This commit is contained in:
guerler
2022-03-05 01:03:30 -05:00
parent 864a4eafd6
commit a078fd0d07
3 changed files with 8 additions and 10 deletions
@@ -6,12 +6,8 @@
:show-annotation="false"
@save="$emit('update:dsc', $event)">
<template v-slot:name>
<h3 data-description="collection name display">{{ name || "(Collection Name)" }}</h3>
<div class="mt-1">
<div class="description">
<ContentDescription :item="dsc" />
</div>
</div>
<h3 data-description="collection name display">{{ name || "Collection" }}</h3>
<ContentDescription :item="dsc" />
</template>
</Details>
</template>
@@ -1,7 +1,7 @@
<!-- When a dataset collection is being viewed, this panel shows the contents of that collection -->
<template>
<UrlDataProvider v-if="dsc" :key="dsc.id" :url="url" v-slot="{ result: payload }">
<UrlDataProvider v-if="dsc" :key="dsc.id" :url="url" auto-refresh v-slot="{ result: payload }">
<ExpandedItems :scope-key="dsc.id" :get-item-key="(item) => item.id" v-slot="{ isExpanded, setExpanded }">
<Layout class="dataset-collection-panel">
<template v-slot:navigation>
@@ -69,7 +69,8 @@ export default {
},
data() {
return {
limit: 500,
offset: 0,
limit: 100,
};
},
computed: {
@@ -85,7 +86,8 @@ export default {
},
url() {
const source = this.dsc.object || this.dsc;
return source.contents_url.substring(1);
const contentUrl = source.contents_url.substring(1);
return `${contentUrl}?offset=${this.offset}&limit=${this.limit}`;
},
},
methods: {
@@ -6,7 +6,7 @@
:writeable="writeable"
@save="$emit('update:currentHistory', $event)">
<template v-slot:name>
<h3 data-description="history name display">{{ history.name || "(History Name)" }}</h3>
<h3 data-description="history name display">{{ history.name || "History" }}</h3>
<h5 class="history-size">
<span v-if="history.size">{{ history.size | niceFileSize }}</span>
<span v-else v-localize>(empty)</span>