Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • It's Vue, see link to docs above, they use root.$refs.component outside the parent, so I assumed this.$refs.component inside. I'll check it out. Commented Nov 14, 2017 at 9:59
  • 1
    Thanks, as far as I can tell it does not work. I think because we are setting the ref inside a component, not the Vue Instance. So when we say this.$refs it does not find the ref we are talking about, because it is not in the instance itself Commented Nov 14, 2017 at 10:03
  • You're correct, the ref goes on the parent template. I've got a working sample now. Commented Nov 14, 2017 at 11:11
  • Thanks, I'm trying your example but adding components to my instance leads to entire page not compiling properly. Ill keep trying maybe im missing something Commented Nov 14, 2017 at 11:27