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

Blank table when resizing columns #3941

Closed
comfroels opened this issue Jan 24, 2020 · 10 comments
Closed

Blank table when resizing columns #3941

comfroels opened this issue Jan 24, 2020 · 10 comments

Comments

@comfroels
Copy link

Environment

  • Package version(s): 3.8.3 (table)
  • Browser and OS versions: Chrome 79.0.3945.117

If possible, link to a minimal repro (fork this code sandbox): You can repro on one of your examples: https://blueprintjs.com/docs/#table/features.freezing

Steps to reproduce

  1. Resize any of the columns in the above example

Actual behavior

Table goes white

Expected behavior

Table renders cell data

Possible solution

Not quite sure why this is happening yet, still trying to dig. Other examples on your site are rendering correctly after the resize, so I'll have to try and figure out what's different

@adidahiya
Copy link
Contributor

I'm not able to repro this in Chrome 79.0.3945.130 or Firefox 72.0.2 on macOS Mojave... do you have a screenshot or gif/video of the problem?

@waltonseymour
Copy link

I believe I'm seeing the same issue on Chrome 81.0.4044.138. It seems to be triggered by resizing columns and can be recovered by scrolling.

bp-table-bug

@strickland84
Copy link

table_bug

I was able to replicate this issue on our project in both Chrome and Firefox so I don't think it's browser specific. I have tried adjusting the Table props to see if I could determine a trigger for this but I could not. As mentioned above it occurs when re-sizing the columns and can be reverted by scrolling.

@strickland84
Copy link

Also, as per my example and the one from @waltonseymour I notice that the first 4 columns remain rendered. Perhaps this is coincidence. 🤷

@ae0n
Copy link

ae0n commented Jul 10, 2020

I have the same issue with resizing. I'm able to repeat this bug in chrome 83.0.4103 and safari 13.1.1. Also only 4 columns are visible after resize and others are gone until I scroll the page.

@adidahiya
Copy link
Contributor

It sounds like this is connected to all the other lifecycle bugs in @blueprintjs/table 3.8.x. For now I would recommend downgrading to 3.7

@ryanrabello
Copy link

I made a bug demo in a codesandbox. https://codesandbox.io/s/blueprint-table-bug-s167l?file=/src/App.tsx
Thanks for the workaround

@wshart
Copy link

wshart commented Dec 3, 2020

Also having this issue and the workaround works for me too, thanks!

@Dessix
Copy link

Dessix commented Feb 8, 2021

Since 3.7 now causes lifecycle warnings in the current stable React, I ended up coming up with a workaround that worked in my use case:
Track the number of column resizes in a useState hook, then set the inline style paddingRight on a div wrapped around the Table to this count, modulo 2. Set onColumnWidthChanged to increment that state.
It tricks the viewport into changing for each time a column resize occurs, causing a rerender.

@evansjohnson
Copy link
Contributor

Hey @adidahiya it looks like this was meant to be closed with #4884 but didn't get picked up since it closed 2 issues.

I'm not able to reproduce like seen in the gifs above at https://blueprintjs.com/docs/#table/features 🎉

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

No branches or pull requests

9 participants