Answer the question
In order to leave comments, you need to log in
Is it possible to access this.$refs from another component?
The Isotope plugin uses this this.$refs.cpt.filter(key)
. But I need to move the navigation to a separate component. How to execute this code from it if the plugin is in another component?
Answer the question
In order to leave comments, you need to log in
Alternatively, make a method in the component that calls this.$refs.cpt.filter(key) and make a call from it:
methods: {
someMethod() {
// ...
this.$refs.cpt.filter(key)
}
}
this.$refs.someComponent.someMethod()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question