Skip to content

Navigate doesn't clear search params #528

@tomasklaen

Description

@tomasklaen

Calling navigate('/foo') will leave search params in place unless there's a replacement search string after the /foo. I don't know why I'd want search to persist between different pages. And if I did, I could always do it manually with navigate(`/foo?${search}`).

This caused me issues where I have a couple routes that use similarly named search params, but whose values absolutely shouldn't carry over. So now I have to do navigate('/foo?dummy') in all of my navigation logic to prevent this behavior.

This really shouldn't be the default that people have to fight with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions