Is there a way to pass a reference to child components? For example:
The Parent
component provides the ref:
<template>
<div ref="myRef" />
</template>
<script>
export default {
name: 'SearchContainer',
provide: {
parentRef: this.$refs.myRef
}
}
</script>
</style>
And the Child
component injects it:
<template>
<div />
</template>
<script>
export default {
name: 'SearchCard',
inject: ['parentRef']
}
</script>
</style>