vue-simple-suggest icon indicating copy to clipboard operation
vue-simple-suggest copied to clipboard

vue-simple-suggestion always re-render even v-model not changed

Open thgiang opened this issue 5 years ago • 0 comments

I'm submitting a ...

  • [ ] bug report

What is the current behavior?

vue-simple-suggestion always re-render even v-model not changed

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Basic test component:

<template>
  <div class="main-content">
    <div class="container-fluid">
      <vue-simple-suggest v-model="test"/>
      <input v-model="content" />
    </div>
  </div>
</template>

<script>
import VueSimpleSuggest from 'vue-simple-suggest'
export default {
  components: {
    VueSimpleSuggest,
  },
  data() {
    return {
      test: 'Tessttttttttttt',
      content: 'Content'
    }
  }
}
</script>

*** Using Vue-Devtools (Chrome extension) -> Vue -> Performance -> Component Render Type something into the input text (named content) you will see that vue-simple-component re-render too.

What is the expected behavior?

I want: It only re-render when the v-model 's value is changed

Please tell us about your environment:

  • Vue.js Version: 2.6.11
  • Vue-simple-suggest version: 1.10.1 (Latest version)
  • Browser: Chrome XX
  • Language: ES6

thgiang avatar Jul 01 '20 10:07 thgiang