Skip to content

fix: Column size incorrect when mixing percentage and pixel widths in FluentDataGrid#4063

Description

@JamesNK

馃悰 Bug Report

The column widths of a data grid aren't correct when the data grid firsts loads when mixing percentage and pixel widths and the mode is Table:

datagrid-pixel-size.mp4
  1. Clone https://github.com/dotnet/aspire.git
  2. Switch to jamesnk/grid-table-display branch
  3. Open Aspire.slnx
  4. Run the TestShop.AppHost project that is in the playground folder
  5. Click on the Online store link on the resources page a couple of times to create traces
  6. Go to traces page and click on an entry
  7. The trace detail page loads. When the page is refreshed the Actions column (width specified in pixels) isn't the correct size.
  8. Moving the mouse cursor onto the page causes the table size to be fixed.

馃 Expected Behavior

Pixel width size is correct. I looked up the rules for column sizes when using table-layout-mode: fixed and first the explicit pixel width size columns are given widths, then the columns width percentages are sized according to the remaining size.

馃槸 Current Behavior

Actions column is smaller than it should be. When I move my mouse onto the screen then it is given the correct size (100px) which I confirmed in browser tools.

馃拋 Possible Solution

馃敠 Context

馃實 Your Environment

  • OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]
  • Browser [e.g. Microsoft Edge, Google Chrome, Apple Safari, Mozilla FireFox]
  • .NET and Fluent UI Blazor library Version [e.g. 8.0.2 and 4.4.1]

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