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

Columns not always resizing correctly on window resize #3249

Open
armiiis opened this issue Jun 1, 2023 · 2 comments
Open

Columns not always resizing correctly on window resize #3249

armiiis opened this issue Jun 1, 2023 · 2 comments
Labels

Comments

@armiiis
Copy link

armiiis commented Jun 1, 2023

Describe the bug

Sometimes columns are not resizing correctly when window is resized.

screen-recording-2023-06-01-at-070912_MDu7szif.mp4

To Reproduce

See video

Expected behavior

Columns resizing correctly.

Environment

  • react-data-grid version: 7.0.0-beta.31
  • react/react-dom version: 18.2.0

Additional context

It's easier to reproduce with developer tools opened. Its harder to reproduce with regular window resize, but also possible. Is there any workaround to manually force columns to resize?

@armiiis armiiis added the Bug label Jun 1, 2023
@andriy-viyatyk
Copy link

I have the same issue on react-data-grid version 7.0.0.-beta.34
It is reproducible on demo page: https://adazzle.github.io/react-data-grid/#/cell-navigation
Steps:

  1. Open dev tool and resize it to hide half width of the grid

image
2. Press "F12" to close dev tool. Press "F12" to open dev tool
Expected: all columns should be visible with recalculated widths
Actual: columns widths not changed and right columns not visible:
image

@andriy-viyatyk
Copy link

Finally I have fixed this issue applying patch using library (https://github.com/ds300/patch-package):

image

this patch implements new DataGrid property "disableColumnVirtualization".
In case when we need "auto" columns to fit the grid width we really do not need "column virtualization"
It will be grate to have in new version separate properties for row and column virtualization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants