blueprint: [Table] only 4 columns render on table mounted if table horizontal overflow

Environment

reproduce: https://codesandbox.io/s/blueprint-sandbox-4envh

Steps to reproduce

  1. create a Blueprintjs Table
  2. set many columns and let table overflow
  3. default rowNum set to 0
  4. setTimeout and update rowNum
  5. only render 4 columns on table mounted

Actual behavior

ezgif com-video-to-gif

Expected behavior

table columns render expected.

Possible solution

The viewportRect.left when table mounted is undefined

then I scroll the table, the viewportRect.left will set to number

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 8
  • Comments: 15 (2 by maintainers)

Most upvoted comments

+1 still happening with the following blueprint deps

{ “@blueprintjs/core”: “^3.19.1”, “@blueprintjs/icons”: “^3.10.0”, “@blueprintjs/select”: “^3.11.0”, “@blueprintjs/table”: “^3.8.1”, }

If it helps, I recently migrated from these older versions of blueprint, I rolled back to remove this rendering error and it’s fine. { “@blueprintjs/core”: “3.15.1”, “@blueprintjs/icons”: “3.9.0”, “@blueprintjs/select”: “3.8.1”, “@blueprintjs/table”: “3.5.0”, }

I also had rendering issues (only left 4 columns would render after a column resize) and it appears to be related to overflow/scrolling. Downgrading to @blueprintjs/table 3.5.0 appears to solve this issue (without introducing new ones/sacrificing any needed features). I did not have to downgrade any of the other packages though.

This is related to #3774, part of a group of issues in table v3.8.x: https://github.com/palantir/blueprint/milestone/41

for now, I think the only good solution is to downgrade to table v3.7.x (it should work fine with the latest core package). sorry this has not been addressed sooner; I hope to take a closer look at this group of issues in the next few weeks.

Same problem here, downgrading to @blueprintjs/table@3.5.0 solves the problem.

+1 still happening with the following blueprint deps

{ “@blueprintjs/core”: “^3.19.1”, “@blueprintjs/icons”: “^3.10.0”, “@blueprintjs/select”: “^3.11.0”, “@blueprintjs/table”: “^3.8.1”, }

If it helps, I recently migrated from these older versions of blueprint, I rolled back to remove this rendering error and it’s fine. { “@blueprintjs/core”: “3.15.1”, “@blueprintjs/icons”: “3.9.0”, “@blueprintjs/select”: “3.8.1”, “@blueprintjs/table”: “3.5.0”, }

My current solution.

  1. add a wrapper div
  2. use ResizeObserver watch the size of wrapper
  3. update table rect when size change

codesandbox

work on

@blueprintjs/core": "3.42.0 @blueprintjs/table": "3.8.27 react": "17.0.2 react-dom": "17.0.2

but not a good solution, I think…