Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Column separator can get hidden when resizing columns in DataGrid #2058

Closed
msb-incom opened this issue May 16, 2024 · 4 comments
Closed
Labels
closed:done Work is finished
Milestone

Comments

@msb-incom
Copy link
Contributor

msb-incom commented May 16, 2024

🐛 Bug Report

When resizing columns in a resizable DataGrid, the column separators can become hidden making it impossible to re-extend the columns without refreshing the page.

💻 Repro or Code Sample

This is reproducible in the samlples at https://www.fluentui-blazor.net/DataGrid

🤔 Expected Behavior

I would expect the separators to stay visible so I can always resize a column back to its original width.

image

😯 Current Behavior

When making a column narrower, I can do it to a point where the separator becomes invisible. Doing so will make me unable to re-size the column.

image

💁 Possible Solution

I believe this can be fixed by making the drag-handle sticky in its position.

🔦 Context

Possible bad user-experience when using the resizable columns feature of the DataGrid component.

🌍 Your Environment

  • OS & Device: Windows
  • Browser: Microsoft Edge
  • .NET 8.0.2 and Fluent UI Blazor library 4.7.2
@vnbaaij
Copy link
Collaborator

vnbaaij commented May 16, 2024

If you have a concrete solution that we can implement, that would be great. I was not able to get it fixed.
PR provided.

With one of the latest releases we introduced resizing per keyboard. + and - will increase/decrease focused column width in steps of 10 pixels. More importantly in your case, Shift+r will reset all widths to their default initial value. No need to refresh the page!

@msb-incom
Copy link
Contributor Author

Hi @vnbaaij
Thanks for the shortcut tip! Wasn't aware 🙏 I submitted a PR that I believe fixes the issue. I'm no master of CSS, so I'm not entirely aware of other consequences it might bring, but I couldn't find any issues 🙂

@vnbaaij
Copy link
Collaborator

vnbaaij commented May 16, 2024

Will test with your PR. Thanks

@vnbaaij vnbaaij added closed:done Work is finished and removed triage New issue. Needs to be looked at labels May 16, 2024
@vnbaaij vnbaaij added this to the v4.7.3 milestone May 16, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented May 16, 2024

PR merged. Will be in next release

@vnbaaij vnbaaij closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:done Work is finished
Projects
None yet
Development

No branches or pull requests

2 participants