Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- selection_status = {key: ‘key’, label: ‘label’}
- <v-select
- v-model="selection_status"
- data-vv-name="userRow.status"
- :options="customerStatusValueArray"
- v-validate="'required'"
- id="status"
- name="status"
- class="form-control editable_field"
- placeholder="Select option"
- ></v-select>
- data() {
- return {
- ...
- selection_status: null,
- mounted() {
- this.loadCustomer();
- }, // mounted() {
- loadCustomer() {
- axios.get(window.API_VERSION_LINK + 'personal/customers/' + this.user_id).then((response) => {
- this.userRow = response.data.user;
- this.customerStatusValueArray.map((nextCustomerStatusValue, index) => {
- if (nextCustomerStatusValue.key == this.userRow.status) {
- this.selection_status = {key: this.userRow.status, label: nextCustomerStatusValue.label};
- }
- });
- ...
- computed: {
- customerStatusValueArray() {
- return this.$store.getters.customerStatusValueArray;
- },
- this.loadCustomer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement