theUnforgiven
3 months ago
99
1
Vue

Each VueJS Help

Posted 3 months ago by theUnforgiven

I have a bunch of checkboxes then a change method in Vue as follows:

groupSelected(index, item) {
        let groupDocs = this.groupDoc;
                groupDocs.map(function(value, key) {
                   
        });
}

this.groupDoc is an array when selected;

// Vue Devtools

groupDoc:Array[2]
     0:"UK birth or adoption certificate"
     1:"Full or provisional UK driving license"

So I basically want to add each of these and there will only ever be 2 as there's a limit of 2 on there, so add each of these to new these:

// in data obj

docOne: '',
docTwo: '',

So these can the show within a div on the page to display to the user

Please sign in or create an account to participate in this conversation.