Skip to content

Fuzzy option not available on matchRoute #374

@riyaadh-abrahams

Description

@riyaadh-abrahams

Describe the bug

The fuzzy option does not seem to be available in tanstack router. Something like this will throw a type error and does not work during runtime as well

const match = router.matchRoute({ to: url, fuzzy: true });

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-6ejtax?file=src%2Fmain.tsx

Steps to Reproduce the Bug or Issue

  1. Click on Posts in the header
  2. See that it highlights red
  3. Click on New Post
  4. See that the highlighted item in the navbar is now grey
  5. Also see the Typescript error when fuzzy option is being used

Expected behavior

With fuzzy enabled, on the posts/new route, the 'posts' navlink in the header should have still been red.

Screenshots or Videos

image

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

image

This seems to work in runtime but showing type errors

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