title: Vue - access nested childs using ref
body: <p>I have vue component which I use inside himself - data can have array with subelements and I use this array to render them in loop, and next level, next level etc. according to nesting level.</p>
  
  <p>Now I would like to run child method from parent and then - if statements are ok, also call it to child, next level etc. </p>
  
  <p>I use </p>
  
  <pre><code>    &lt;mycomponent
              ref="myFirstLevelRefName"
              (...)
      &gt;&lt;/mycomponent&gt;
  </code></pre>
  
  <p>and then:</p>
  
  <pre><code>this.$refs.myFirstLevelRefName 
  </code></pre>
  
  <p>to call first-level childs. But what about about child nodes? I use them in view in that way:</p>
  
  <pre><code>    &lt;mycomponent
              v-for="(subElement, index) in getSubelements()"
              ref="???"
              v-bind:data="subElement"
              v-bind:key="index"
      &gt;&lt;/mycomponent&gt;
  </code></pre>
  
  <p>I tried sent this.$refs from child level to console, but it's empty. </p>
  
  <p>How should I set ref name in nested elements and then call them from parent?</p>