Skip to content

fix: Datagrid Column header not flex display if no Sortable property is given #3306

@PascalVorwerk

Description

@PascalVorwerk

🐛 Bug Report

Most of my table columns are sortable, but after upgrading to 4.11 i noticed one table did something weird:

Visual:
Image

Html:

Image

Razor:

   <PropertyColumn Property="@(environment => environment.AppName)" Title="App">
                        <ColumnOptions>
                            <FluentSearch @bind-Value="@_linkedEnvironmentSearch"
                                          Immediate ImmediateDelay="200"
                                          Placeholder="App naam..."/>
                        </ColumnOptions>
                    </PropertyColumn>

After adding a sortable property, a display: flex property is given to the table header.

Visual:

Image

Html:

Image

Razor:

<PropertyColumn Property="@(environment => environment.AppName)" Title="App" Sortable="false">
                        <ColumnOptions>
                            <FluentSearch @bind-Value="@_linkedEnvironmentSearch"
                                          Immediate ImmediateDelay="200"
                                          Placeholder="App naam..."/>
                        </ColumnOptions>
                    </PropertyColumn>

🤔 Expected Behavior

I'd probably expect the default value of sortable to be False and then this will be fixed, the property is nullable now and that is probably why this is happening? The header needs to be a flex display :)

💁 Possible Solution

Either:

  • If Sortable is null, still make the header a display:flex property
  • Default the sortable property to a false value
  • Make the sortable property a required property to define

In order of what i believe is most desirable? 😄

🌍 Your Environment

Fluent Components 4.11.3, .NET 9, Global interactivity set to WebAssembly and prerendering disabled.

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