title: proper use of Vue $refs
body: <p>Im attempting to recreate <a href="https://jsfiddle.net/gehtwxeo/89/" rel="noreferrer">this exact</a> inline editing functionality in on of my vue components. However, and I may be wrong, I see some of the syntax is outdated Vue, in particular the <code>v-el</code> directive being used. I've attempted to update the syntax like so:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({
    el: '#app',
    data: {
      numbers: [{
          val: 'one',
          edit: false
        },
        {
          val: 'two',
          edit: false
        },
        {
          val: 'three',
          edit: false
        }
      ]
    },
  
    methods: {
      toggleEdit: function(ev, number) {
        number.edit = !number.edit
  
        // Focus input field
        if (number.edit) {
          Vue.nextTick(function() {
            ev.$refs.input.focus(); // error occurs here
          })
        }
      },
  
      saveEdit: function(ev, number) {
        //save your changes
        this.toggleEdit(ev, number);
      }
    }
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="app"&gt;
    &lt;template v-for="number in numbers"&gt;
          &lt;span v-show="!number.edit"
                v-on:click="toggleEdit(this, number)"&gt;{{number.val}}&lt;/span&gt;
  
          &lt;input type="text"
                 ref="input"
                 v-model="number.val"
                 v-show="number.edit"
                 v-on:blur="saveEdit(ev, number)"&gt; &lt;br&gt;
      &lt;/template&gt;
  &lt;/div&gt;
  &lt;script src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>However I get a range of errors... any suggestions on how to properly execute this?</p>
  
  <p><strong>Here is the Error:</strong></p>
  
  <blockquote>
    <p>[Vue warn]: Error in nextTick: "TypeError: undefined is not an object
    (evaluating 'ev.$refs.input')"</p>
  </blockquote>