Skip to content
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

Mocked example of Link without "from" behavior change #3106

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Cornally
Copy link

@Cornally Cornally commented Jan 3, 2025

πŸ‘‹

After stubbing an example, it makes sense as to why things behave the way they do β€” It just caught me off guard (this changes existing behavior).

I have a layout-level component (a user navigation dropdown). My application spawn modals based on a search param, modalId. For example, I can be on /_layout/route-b and click a link in the user dropdown (mounts inside _layout.tsx) intended to stay on the current visible route with the only change being a modal spawned on top of the current content.

I was triggering modals by way of <Link to="." search={{(prev) => ({...prev, modalId: 'sign-out-confirmation' }) }} />
This worked up until v1.81.9. As of v1.81.10, I'm passing an extra from={undefined} to retain the same behavior. Without this change, modals fall back to using the root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant