Skip to content

Not possible to omit NavLink href #13983

@ziimakc

Description

@ziimakc

Reproduction

<NavLink href={null} />
<NavLink href={undefined} />

System Info

-

Used Package Manager

pnpm

Expected Behavior

It should be possible to omit to or set it to undefined same as for a href html element to omit url.

This is useful to disable navigation while still showing element, for example for pagination.

Actual Behavior

Omitting to resolves to current path <a href='my-current-path'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions