How to get the dialog column value of vuetify datatables after save is click?


#1

the code below will just alert ‘undefined’

 <v-edit-dialog
              :return-value.sync="props.item.firstname"
              large
              lazy
              persistent
              @save="save(props.item.firstname)"
              @cancel="cancel"
              @open="open"
              @close="close"
            >
              <div>{{ props.item.firstname }}</div>
              <div slot="input" class="mt-3 title">Update First Name</div>
              <v-text-field
                slot="input"
                v-model="props.item.firstname"
                :rules="[max25chars]"
                label="Edit"
                single-line
                counter
                autofocus
              ></v-text-field>
            </v-edit-dialog>

 methods:{
		
		save: function(a){
			alert(a.firstname);
		}

#2

You pass save(props.item.firstname), but then you alert alert(a.firstname).

Should it not be alert(a)?..


#3

yes. you are correct. thanks for pointing this out.