Skip to content

FluentDataGrid - column resizing with additional unwanted effects #2381

Closed

Description

@gryzorr

🐛 Bug Report

When resizing FluentDataGrid column at the beginning width of current column gets smaller and all previous one shrinks also a little.

💻 Repro or Code Sample

See video and attachment.

🤔 Expected Behavior

When starting resize operation previous columns and current one should not shrink.

😯 Current Behavior

Each time user starts resize column (very little move to right to start enlarge column) all columns to the left shrinks causing that current column gets smaller on start (resize cursor doesn't match column separator). When there is more columns and user repeats operation for more than one column sometimes prevoius one need correction and so on.

💁 Possible Solution

beyond my capabilities :-)

🔦 Context

Minor problem (at the moment we use components only for internal app) but nice to have a solution.

🌍 Your Environment

  • OS & Device: Windows
  • Browser: Microsoft Edge, Google Chrome
  • .NET and Fluent UI Blazor library Version: 4.9.1
Nagrywanie.ekranu.2024-07-15.155130.mp4

Activity

  1. added
    triage
    on Jul 15, 2024
  2. gryzorr commented on Jul 15, 2024

    @gryzorr
    Author

    And ofcourse example code.
    BlazorAppTest.zip

  3. added
    status:needs-investigation
    and removed
    triage
    on Jul 15, 2024
  4. michaelc06 commented on Jul 16, 2024

    @michaelc06

    Can confirm noticing the same issues. Repeatable on https://www.fluentui-blazor.net/DataGrid -> Typical usage

  5. f4n0 commented on Jul 16, 2024

    @f4n0
    Contributor

    Hi, Vincent Baaij (@vnbaaij) !
    I've tried something. by editing the js function to use % values instead of px values, it seems to work better. but I don't think that could be the real fix to the issue

  6. vnbaaij commented on Jul 17, 2024

    @vnbaaij
    Collaborator

    I think it has to do with conversion of fractions to pixels. Not sure if we can do anything about that.

    Considering this as a minimum impact issue which I will not spend too much time on.

    I labeled this as a community issue. Someone interested in solving this can pick it up. If no one responds, I will close this in about a week.

  7. added
    community:contribution
    and removed
    status:needs-investigation
    on Jul 17, 2024
  8. f4n0 commented on Jul 18, 2024

    @f4n0
    Contributor

    Well, I don't really think that this is a minimum impact issue.
    The column resizing of a table it's an essential feature, and this need to work. The end user uses this functionality practically every day!

    For my app, if you resize the table multiple times, the select column will disappear!

    EDIT:
    Why is fluentui-blazor resizing columns via grid template column? why not the width parameter?

  9. added a commit that references this issue on Jul 18, 2024
    502eee1
  10. vnbaaij commented on Jul 18, 2024

    @vnbaaij
    Collaborator

    Well, I don't really think that this is a minimum impact issue. The column resizing of a table it's an essential feature, and this need to work. The end user uses this functionality practically every day!

    You make it sound as if it does not work at all. I'm just saying that is not the case. Resizing is possible but has some visible quirks. Please understand we have a limited amount of time to work on this. There are more grave issues we need to work on.

    For my app, if you resize the table multiple times, the select column will disappear!

    That is something we definitely need to look at.

    EDIT: Why is fluentui-blazor resizing columns via grid template column? why not the width parameter?

    Because the underlying web components automatically populate and use the grid template columns value

    Thank you for your PR!! We will test and verify that one soon.

  11. added a commit that references this issue on Dec 20, 2024
    a48be2f
  12. thebarrettlo commented on Jan 3, 2025

    @thebarrettlo
    Contributor

    Just want to note that similar "jumpy" column behavior is also seen when wrapping a FluentDataGrid in a FluentCard. I've confirmed by testing in the demo site that #3072 does fix this issue too (thanks f4n0 (@f4n0)!), so if anyone else is experiencing the same issue, make sure you're using a version of the Fluent UI library that includes #3072 (v4.11.1 I believe).

    FluentDataGrid.jumpy.column.resizing.when.in.FluentCard.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

community:contribution

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions