AustinGil/vuetensils

v-copy does not work with reactivity and computed property on nuxt/vuetify

andrewspy opened this issue · 4 comments

v-copy only copied the initial value, and reactivity / computed property does not seem to work as expected. Below are snippets for nuxt/vuetify using vuetensils@v0.6.1. Not sure if it's related to nuxt/vuetify only.

<script type="text/x-template" id="app-template">
  <v-app>
    <v-container>
      <!-- -->
      <v-text-field v-model="name">
        <template slot="append">
          <v-btn v-copy="computedName">
            Copy
          </v-btn>
        </template>
      </v-text-field>
      computed: {{ computedName }}
    </v-container>
  </v-app>
</script>

<div id="app"></div>
const App = {
  template: '#app-template',
  data: () => ({
    //
    name: 'vuetensils',
  }),
  computed: {
    computedName() {
      const { name } = this;
      return `[${name}]`;
    }
  }
}


new Vue({
  vuetify: new Vuetify(),
  render: h => h(App)
}).$mount('#app')

Hey @andrewspy, thanks for the bug report. I think it makes sense that this doesn't work. Not just a Nuxt/vuetify thing. I've got an idea on what the solution is. Pretty simple :)

@andrewspy, I just pushed up a fix. Tested it locally, but can up upgrade and let me know if it works for you?

@Stegosource Thanks for the quick fix. It is working as expected now. Closing the issue.

Yep. Thanks for the bug report. Please feel free to checkout the latest release notes and let me know what you think: https://stegosource.com/vuetensils-0-6-simpler-forms-better-accessibility-useful-filters/