[Vuejs]-Vuejs ref property has no effect when using with createElement

0👍

The ref is beign applied and i made a fiddle to see it that it works.

But,if you want to add a reference to sm-form-row component then you have to add the ref attribute in the parent component.For example in parent component:

<sm-form-row ref="formRow" />

And in your parent component you can access it as:

this.$refs.formRow

Also you will be able to access the methods of the child component.For example if the child component has a method called myMethod you can access it in parent component like this:

this.$refs.formRow.myMethod

Leave a comment