Skip to content

Commit

Permalink
Add computed documents types
Browse files Browse the repository at this point in the history
  • Loading branch information
myovchev committed Sep 2, 2024
1 parent c3c3216 commit 53bd65d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ui/apos/components/AposExportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export default {
type: Array,
default: () => []
},
checkedTypes: {
type: Array,
default: () => []
},
doc: {
type: Object,
default: null
Expand Down Expand Up @@ -204,6 +208,11 @@ export default {
label: format.label,
value: format.name
}));
},
checkedTypesComputed() {
return this.moduleName === '@apostrophecms/page' && !this.type
? this.checkedTypes
: [ this.type ];
}
},
Expand All @@ -229,7 +238,7 @@ export default {
this.relatedTypes = await apos.http.get('/api/v1/@apostrophecms/import-export/related', {
busy: true,
qs: {
types: [ this.type ]
types: this.checkedTypesComputed
}
});
this.checkedRelatedTypes = this.relatedTypes;
Expand Down

0 comments on commit 53bd65d

Please sign in to comment.