D
D
Dj20212021-11-09 12:08:13
Vue.js
Dj2021, 2021-11-09 12:08:13

How to pass props.item.age to :return-value.sync in Vuetify?

To edit name and age, I added v-edit-dialog to the table. How to pass props.item.name and props.item.age to :return-value.sync?

<template v-slot:item.salary="props">
                <v-edit-dialog
                  :return-value="props.item.name"
                  large
                  persistent
                  @save="save"
                  @cancel="cancel"
                  @open="open"
                  @close="close"
                >
                  <div>
                    {{ props.item.name }} ₽ ({{ props.item.age }}%)
                  </div>
                  <template v-slot:input>
                    <div class="mt-4 text-h6">Name</div>
                    <v-text-field
                      v-model="props.item.name"
                      label="Edit"
                      single-line
                      counter
                      autofocus
                    ></v-text-field>
                    <div class="mt-4 text-h6">Age</div>
                    <v-text-field
                      v-model="props.item.age"
                      label="Edit"
                      single-line
                      counter
                      autofocus
                    ></v-text-field>
                  </template>
                </v-edit-dialog>
              </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