You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click on the 'show' button to open the menu. In console you should see this error: Cannot read property 'updateScroll' of undefined. It happens because $refs object is empty at this time.
But.. when we replace @Enter hook with @after-enter, then everything works again and we have access to the $refs
And one more important thing. This bug occurs only when we use v-show to control visibility of the element. If we replace v-show with v-if, then this bug no longer happens.
What is Expected?
I expect to have access to component's $refs inside transition @Enter hook.
What is actually happening?
$refs object is empty when I try to access it inside @Enter hook.
The text was updated successfully, but these errors were encountered:
Closed by reverting the ref callback changes. I think we'll just drop the feature because it's difficult to implement it without breaking backwards compat.
@yyx990803
Some time we want to be notify if some component is rendered, the callback ref is very useful in those cases, else we need to implement events 'inited' in mounted for all components we want to monitor.
For the fail in this case, I think it's caused by resetRefs.
do we have any plan to get callback ref back? or can I give any help on this?
@kindy
Maybe we can use directive to implement ref callback function.
I published a plugin vue-ref, you can try it.
I used it in ant-design-vue and found no problems for the time being.
Uh oh!
There was an error while loading. Please reload this page.
Vue.js version
v2.2.0-beta.1
Reproduction Link
2.2.0-beta.1 with bug(?) - https://jsfiddle.net/sqal/6xug3huc/1/
2.1.10 working repo - https://jsfiddle.net/sqal/hx0cb267/1/
Steps to reproduce
Cannot read property 'updateScroll' of undefined
. It happens because$refs
object is empty at this time.And one more important thing. This bug occurs only when we use v-show to control visibility of the element. If we replace v-show with v-if, then this bug no longer happens.
What is Expected?
I expect to have access to component's
$refs
inside transition @Enter hook.What is actually happening?
$refs
object is empty when I try to access it inside @Enter hook.The text was updated successfully, but these errors were encountered: