R
R
Richard Millie2019-10-31 14:20:48
JavaScript
Richard Millie, 2019-10-31 14:20:48

How to pass data from a multiselect menu to a specific field?

When I click on the start button, the start(item){...} function is executed

start(item) {
                var self = this;
                this.clicked.push(item.id)
                console.log(item)
                HttpService.methods.get('/process/' + item.id)
                    .then(function (response) {
                        console.log(response);
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
                }

How to pass data from the multiselect menu to the item.policies field?
Function that changes item
changeItem(item, val) {
            item.selector = val
            console.log(item)
        }

Multiselect menu (with my data transfer experience):
<template v-slot:item.policies="{ item }">
              <div class="dropdown-checkbox form-group">
                <label class="label-title"><p>Select</p></label>
                <ul>
                  <li><label><input value="1" @click=" changeItem(item,1)" type="checkbox">1</label></li>
                  <li><label><input value="2" @click=" changeItem(item,2)" type="checkbox">2</label></li>
                  <li><label><input value="3" @click=" changeItem(item,3)" type="checkbox">3</label></li>
                </ul>
              </div>
            </template>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question