-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(teleport): ensure correct rendering when target is empty #9783
base: main
Are you sure you want to change the base?
fix(teleport): ensure correct rendering when target is empty #9783
Conversation
Size ReportBundles
Usages
|
CodSpeed Performance ReportMerging #9783 will not alter performanceComparing Summary
|
❌ Deploy Preview for vue-sfc-playground failed.
|
❌ Deploy Preview for vue-next-template-explorer failed.
|
@yyx990803 could we have this merged? It's weird that you have to have have an "or" in the to prop: <Teleport :to="props.teleportTo || 'body'" :disabled="!props.teleportTo"> if you forget, the ssr doesn't render the content anywhere. |
@xvaara I'm not sure exactly what problem you're having, but based on the example you gave I don't think this PR will fix it. This change only impacts cases where |
@skirtles-code We created out own internal teleport component that basically has a render function: return () =>
props.disabled || !props.to
? slots.default?.()
: h(Teleport, {to: props.to}, [slots.default?.()]) That way we don't have hydration mismatches. |
close: #9782
close: #8146