mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
get SocialIssues List in multiselect
This commit is contained in:
@@ -3,12 +3,18 @@
|
||||
<h3>{{ $t('social_issue.title') }}</h3>
|
||||
|
||||
<div>
|
||||
<label for="selectIssues">{{ $t('social_issue.label') }}</label>
|
||||
<!--label for="selectIssues">{{ $t('social_issue.label') }}</label-->
|
||||
<VueMultiselect
|
||||
name="selectIssues"
|
||||
v-model="selected"
|
||||
track-by="id"
|
||||
label="text"
|
||||
:placeholder="$t('social_issue.label')"
|
||||
:multiple="true"
|
||||
:searchable="true"
|
||||
:close-on-select="false"
|
||||
:allow-empty="true"
|
||||
:show-labels="false"
|
||||
:options="options">
|
||||
</VueMultiselect>
|
||||
</div>
|
||||
@@ -18,6 +24,7 @@
|
||||
|
||||
<script>
|
||||
import VueMultiselect from 'vue-multiselect'
|
||||
import { getSocialIssues } from '../api'
|
||||
|
||||
export default {
|
||||
name: "SocialIssue",
|
||||
@@ -25,8 +32,22 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
selected: null,
|
||||
options: ['list', 'of', 'options']
|
||||
options: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted() {
|
||||
this.getOptions();
|
||||
},
|
||||
methods: {
|
||||
getOptions() {
|
||||
getSocialIssues().then(socialIssues => new Promise((resolve, reject) => {
|
||||
console.log('socialIssues', socialIssues);
|
||||
this.options = socialIssues.results;
|
||||
resolve();
|
||||
})).catch(error => this.$store.commit('catchError', error));
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user