Skip to content

Link to child route with optional param causes havoc in url #279

@abergs

Description

@abergs

I have a parent route with an optional :employeeId? segment.

But when linking to a child route of that route via <Link to="info" params={{employeeId:1}} /> the outputed url is "employees/1?%2Finfo=".

Tracked it down to the paramMatcher in Path.js:
var paramMatcher = /:([a-zA-Z_$][a-zA-Z0-9_$])|[.()[]+|{}^$]/g;

But adding ? to the matching only caused the route not to match at all.

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