Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Vuetify v-menu component 'save' method?

There is an example in Vutetify documentation (https://vuetifyjs.com/en/components/date-pickers/#dialog-and-menu). That example has next template code snippet:

...
      <v-menu
        ref="menu"
        v-model="menu"
        :close-on-content-click="false"
        :return-value.sync="date"
        transition="scale-transition"
        offset-y
        min-width="auto"
      >
        ...
        <v-date-picker
          v-model="date"
          no-title
          scrollable
        >
          ...
          <v-btn
            text
            color="primary"
            @click="$refs.menu.save(date)"
          >
            OK
          </v-btn>
        </v-date-picker>
      </v-menu>

It looks like that when a button click ( @click="$refs.menu.save(date)" ) occurs, some 'save' method of the v-menu component is called. But where is it possible to see information about Vuetify component methods and particularly about that menu save method?

like image 485
AksenovAN Avatar asked Feb 09 '26 18:02

AksenovAN


1 Answers

The save() method is provided by the Returnable mixin, which allows control over the value returned by the return-value property.

You can see its source code here.

like image 76
Igor Moraru Avatar answered Feb 12 '26 16:02

Igor Moraru