Skip to content

Parent context becomes undefined when child validateSearch fails and changes params #3170

@david-612

Description

@david-612

Which project does this relate to?

Router

Describe the bug

When the validateSearch in a route fails and changes the search params the inherited context is lost. This happens when coming from outside so it isnt a navigation triggered by the router itself.

Your Example Website or App

https://stackblitz.com/edit/github-yzwmzb18

Steps to Reproduce the Bug or Issue

  1. Run project
  2. Click the second link

Expected behavior

The expected outcome is that the link coming from the outside should behave the same as the link triggered by the router. The params should be modified since they are invalid but the context should remain.

Screenshots or Videos

No response

Platform

  • OS: Windows 10
  • Browser: Edge,Firefox
  • Version: Edge Version 131.0.2903.146 (Official build) (64-bit)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions