-
Notifications
You must be signed in to change notification settings - Fork 971
feat(Modal): add forceMount prop to allow modal to render in SSR #5659
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
Open
maxarias-io
wants to merge
5
commits into
nuxt:v4
Choose a base branch
from
maxarias-io:v4
base: v4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit: |
Author
|
woops let me check the types |
benjamincanac
requested changes
Dec 11, 2025
Author
|
I ran into an issue while testing this locally, it seems that after you close the modal the body will still have Ideas? |
Member
|
I'm not entirely sure the Dialog component is made for SSR, take a look at unovue/reka-ui#688 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Linked issue
Resolves: #3605
β Type of change
π Description
Reka UI's Teleport primitive (used by DialogPortal) conditionally renders content using:
<Teleport v-if="isMounted || forceMount">https://github.com/unovue/reka-ui/blob/v2/packages/core/src/Teleport/Teleport.vue#L41-L48
Without forceMount: The modal content is never rendered server-side because isMounted is false and forceMount defaults to false. Users see modals "pop in" after hydration.
With forceMount: true: The content renders during SSR regardless of mount state, enabling proper server-rendered modals for use cases like query-parameter-driven modal states.
This prop was available in Reka UI's DialogPortal but was not being forwarded by Nuxt UI's Modal component.
Also even if we disable the portal, the Teleport component will not render
π Checklist