A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue/issues/6641 below:

using a component containing a top level v-if in parent with $refs · Issue #6641 · vuejs/vue · GitHub

Version

2.4.4

Reproduction link

https://jsfiddle.net/TomKaltz/aao0waem/

Steps to reproduce

Define a component where the top level element has a v-if. Declare that component in the parent template with a ref.

What is expected?

The ref should be available even if the component top-level v-if is false

What is actually happening?

Even if the v-if is false, the component is still accessible via $refs on first load. When you toggle the component v-if from false to true to false the parent ref becomes undefined. The component beforeDestroy and destroyed event also does not fire.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4