Skip to content

ButtonType.Link does not work properly within Virtualize component #510

@MarvinKlein1508

Description

@MarvinKlein1508

Describe the bug

There is an issue when using ButtonType.Link in context within a Virtualize component.

<Virtualize Items="Items" Context="item">
    <div class="mb-3">
        <span class="me-1">@item.Name</span>

        <Button Color="ButtonColor.Primary" Type="ButtonType.Link" To="@($"/Test/{item.Id}")">
            Edit
        </Button>
    </div>
</Virtualize>

Notice the corresponding URL on the button right of the images:

First page:
grafik

Second page:
grafik

It looks like parameter To does not become updated when the content of the Virtualize component does change.

Using vanilla HTML works as expected.

<a class="btn btn-primary" href="/Test/@item.Id">Edit</a>

Expected behavior
To parameter should show the corresponding ID

GitHub repo
GitHub repo with minimal code to reproduce the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions