Repository navigation
fix(vue): give Outlet the children of the current grouped view - #126
Open
leo-millennial wants to merge 1 commit into
Open
leo-millennial wants to merge 1 commit into
leo-millennial wants to merge 1 commit into
Conversation
RouteRenderer provided the children of its first view once, in setup. Views of one withLayout group share a renderer, so a page that took over the group got an Outlet with the children of the previous page, and rendered them if they were still open. The renderer now provides a getter, and Outlet reads the children of the view rendered at the time it mounts.
|
|
🦋 Changeset detectedLatest commit: 0ede451 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for effector-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
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
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.
Summary
<Outlet />in a page of awithLayoutgroup rendered the children of the first page of the group. Related: #124.RouteRendererprovidedrouteView.childrenonce in setup. Pages of one group share a renderer through the group key, so a page that took over a mounted group got the children of the previous page. The renderer now provides a getter, andOutletreads it when it mounts. The new test renderssecond:aonmainandsecond:bhere.The bug shows when a switch keeps the group mounted, as in the test "keeps a grouped layout mounted while sibling pages switch". With path navigation the old route closes a few microtasks before the new one opens, so the layout remounts and gets fresh children (#57). Once the layout stays mounted on path navigation too, this fix is needed there.
Type of change
Checklist
pnpm buildpassespnpm typecheckpassespnpm testpasses and I added/updated tests for my changepnpm lintpassespnpm changeset), or an empty one for no-release changes (pnpm changeset --empty)