Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Load collections of different resources on change #816

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/components/CollectionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ export default {
name: {
type: String,
default: ''
},
isActive: {
type: Boolean,
default: true
}
},
data() {
Expand Down Expand Up @@ -163,12 +167,41 @@ export default {
return options
}
},

mounted() {
actions.fetchCollectionsByResource({
resourceType: this.type,
resourceId: this.id
})
},

watch: {
nickvergessen marked this conversation as resolved.
Show resolved Hide resolved
type() {
if (this.isActive) {
actions.fetchCollectionsByResource({
resourceType: this.type,
resourceId: this.id
})
}
},
id() {
if (this.isActive) {
actions.fetchCollectionsByResource({
resourceType: this.type,
resourceId: this.id
})
}
},
isActive(isActive) {
if (isActive) {
actions.fetchCollectionsByResource({
resourceType: this.type,
resourceId: this.id
})
}
}
},

methods: {
select(selectedOption, id) {
if (selectedOption.method === METHOD_CREATE_COLLECTION) {
Expand Down