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
Vue 2 Comparison with Vue 3
If there are some issues with running the preview, try to refresh it using the refresh button in the console.
Steps to reproduce
Toggle the checkbox in the preview and observe the conditionally rendered content and slot objects values in the console. Try to change the initial showSlots value in the App component to false and observe the difference.
What is expected?
The context.slots property should be updated when slots are rendered conditionally and contain up-to-date value in the updated hook. Behaviour should be identical to the vue 3 example.
What is actually happening?
The value of context.slots doesn't seem to be updated after component initialization.
The text was updated successfully, but these errors were encountered:
tomasz-pucka
changed the title
$scopedSlots are not mirrored correctly in context.slots$scopedSlots is not mirrored correctly in context.slotsMar 3, 2022
The same problem.... got empty context.slots object when the slot was updated after mounted lifecycle. Using getCurrentInstance().vnode.componentInstance.$scopedSlots.default?.({}) can get the current slots content, but context.slots cannot
Version
1.4.9
Reproduction link
Vue 2
Comparison with Vue 3
If there are some issues with running the preview, try to refresh it using the refresh button in the console.
Steps to reproduce
Toggle the checkbox in the preview and observe the conditionally rendered content and slot objects values in the console. Try to change the initial
showSlots
value in theApp
component tofalse
and observe the difference.What is expected?
The
context.slots
property should be updated when slots are rendered conditionally and contain up-to-date value in theupdated
hook. Behaviour should be identical to the vue 3 example.What is actually happening?
The value of
context.slots
doesn't seem to be updated after component initialization.The text was updated successfully, but these errors were encountered: