mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
options managed by data, not store
This commit is contained in:
@@ -33,11 +33,15 @@ import { mapState, mapActions } from 'vuex';
|
||||
export default {
|
||||
name: "SocialIssue",
|
||||
components: { VueMultiselect },
|
||||
data() {
|
||||
return {
|
||||
options: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
value: state => state.accompanyingCourse.socialIssues,
|
||||
options: state => state.socialIssueOptions,
|
||||
})
|
||||
}),
|
||||
},
|
||||
mounted() {
|
||||
this.getOptions();
|
||||
@@ -46,7 +50,7 @@ export default {
|
||||
getOptions() {
|
||||
getSocialIssues().then(elements => new Promise((resolve, reject) => {
|
||||
console.log('get socialIssues', elements.results);
|
||||
this.$store.commit('setSocialIssueOptions', elements.results);
|
||||
this.options = elements.results;
|
||||
resolve();
|
||||
})).catch(error => this.$store.commit('catchError', error));
|
||||
},
|
||||
|
Reference in New Issue
Block a user