Skip to content

Quickgrid PropertyColumn Align property doesn't work with Align.Right #50029

@adamdusty

Description

@adamdusty

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The PropertyColumn elements of the QuickGrid component aren't aligned properly when the Align property is defined as Align.Right. The generated html table elements are classed as col-justify-right but the css class is labeled as col-justify-end so the style isn't applied. This is observable on the QuickGrid demo site https://aspnet.github.io/quickgridsamples/sample

Expected Behavior

Columns to be right aligned when the Align property is Align.Right.

Steps To Reproduce

dotnet new blazorwasm-empty
Uncomment scoped css link in index.html

Index.razor

@inject DataSource Data

<div class="grid">
    <QuickGrid Items="@Data.People" Theme="corporate">
        <PropertyColumn Align="Align.Left" Property="@(c => c.PersonId)" Sortable="true"  />
        <PropertyColumn Align="Align.Right" Property="@(c => c.FirstName)" Sortable="true" />
    </QuickGrid>
</div>

@code {
    record Person(int PersonId, string Name, DateOnly BirthDate);

    IQueryable<Person> people = new[]
    {
        new Person(10895, "Jean Martin", new DateOnly(1985, 3, 16)),
        new Person(10944, "António Langa", new DateOnly(1991, 12, 1)),
        new Person(11203, "Julie Smith", new DateOnly(1958, 10, 10)),
        new Person(11205, "Nur Sari", new DateOnly(1922, 4, 27)),
        new Person(11898, "Jose Hernandez", new DateOnly(2011, 5, 3)),
        new Person(12130, "Kenji Sato", new DateOnly(2004, 1, 9)),
    }.AsQueryable();
}

dotnet run

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Pillar: Technical DebtPriority:2Work that is important, but not critical for the releasearea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-blazor-quickgrid

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions