Skip to content

Feature Request: Virtualize component index information #31835

Description

@amartens181

I'd like the ability to use the current index information in a <virtualize> for CSS even/odd classes.

Is your feature request related to a problem? Please describe.

Using nth-child in a virtual list leads to unpleasant class-shifting, so baking it in as a class fixes the issue

Describe the solution you'd like

Exposing the current index would be okay. Exposing some properties (like Index, IsEven, IsOdd, IsFirst, IsMiddle, IsLast) would help with other use-cases

Additional context

Most JS virtualization libraries I've used expose these for easy class binding

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: DuplicateResolved as a duplicate of another issueStatus: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-virtualizationThis issue is related to the Blazor Virtualize component

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions