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
The directive should be resolved at the top level rather than inline. I'm not sure if this is even possible because JSX can be used anywhere so there isn't really an easy way to determine what the "render function root scope" is. Maybe slotFlags need to be disabled if a directive is used?
If a directive is manually imported and in scope then resolveDirective should not be used and the already-imported directive should just be referenced directly. I think the old JSX plugin (for Vue 2) did this?
Reported in discord but it never went anywhere.
🐛 Bug description
https://vue-jsx-explorer.netlify.app/#%3CComp%3E%0A%20%20%7B%7B%0A%20%20%20%20default%3A%20()%20%3D%3E%20%3Cdiv%20v-foo%20%2F%3E%0A%20%20%7D%7D%0A%3C%2FComp%3E
If you run this you get
Cannot read properties of undefined (reading 'deep')
because the directive is being resolved in CompA instead of CompB@yyx990803 said:
🏞 Desired result
The directive should be resolved at the top level rather than inline. I'm not sure if this is even possible because JSX can be used anywhere so there isn't really an easy way to determine what the "render function root scope" is. Maybe slotFlags need to be disabled if a directive is used?
🚑 Other information
Kinda related, implicit default slots don't emit slotFlags:
implicit slot: https://vue-jsx-explorer.netlify.app/#%3CComp%3E%0A%20%20%3Cdiv%20v-foo%20%2F%3E%0A%3C%2FComp%3E
explicit slot: https://vue-jsx-explorer.netlify.app/#%3CComp%3E%0A%20%20%7B%7B%0A%20%20%20%20default%3A%20()%20%3D%3E%20%3Cdiv%20v-foo%20%2F%3E%0A%20%20%7D%7D%0A%3C%2FComp%3E
The text was updated successfully, but these errors were encountered: