adazzle / react-data-grid

Feature-rich and customizable data grid React component
https://adazzle.github.io/react-data-grid/
Other
6.92k stars 2.18k forks source link

Values not showing up for right-hand column cells when resize the window #1087

Closed francesc79 closed 6 years ago

francesc79 commented 6 years ago

Which version of React JS are you using?

✅ Officially supported ✅

⚠️ Not officially supported, expect warnings ⚠️

☣️ Not officially supported, expect warnings and errors ☣️


Which browser are you using?

✅ Officially supported ✅

⚠️ Not officially supported, but "should work" ⚠️


I'm submitting a ...

👋 Need general support? Not sure about how to use React itself, or how to get started with the Grid? Please do not submit support request here. Instead see

https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md


Issue Details

When I resize the window same column cells disappear. I debug the library and I find what hepped. Into ViewportScrollMixin module is defined componentWillReceiveProps livecycle hook that call updateScroll function. The problem for my opinion is that when call updateScroll without last parameter width the function getRenderedColumnCount consider this.props.columnMetrics.totalWidth that is not updated.

--

animeshkayal commented 6 years ago

Facing similar issue while increasing the width of a column and then horizontal scroll to right.

zyxelvincenzo79 commented 6 years ago

i have the same problem

thupi commented 6 years ago

I have same issue and is currently looking for a table solution :-) Any progress on this :-) ?

francesc79 commented 6 years ago

@thupi I opened a PR, the bug was just fix, I'm waiting the merge with master. If you want try the fix you can checkout francesc79/react-data-grid branch zazos-issue-1087.

amanmahajan7 commented 6 years ago

This is a known issue where sometimes the cell content is empty. We are actively working on improving the cell rendering logic and v4 should address this issue. In the meantime re-rendering grid seems like a potential solution

window.addEventListener('resize', () => {
   // Re-render grid
   // May be recalculate grid's minHeight
   const minHeight = ....;
   this.setState({ minHeight });
   // Or may be forceUpdate (not a huge fan of this approach)
   this.forceUpdate();
});
animeshkayal commented 6 years ago

Hi Aman, Kindly let us know when can we expect the V4 release?

rlreamy commented 6 years ago

Is this fixed in any of the v4 releases?

kevyu commented 6 years ago

I think the bug still exists in v4.

amanmahajan7 commented 6 years ago

Please check the change log for what is included in v4. We recently merged a PR that improves cell rendering logic and will fix this particular issue. It is a big rewrite and we discovered a few bugs during internal testing. This is being actively worked on but at this moment we do not know when this will be released. I will keep you all posted.

MickaToast commented 6 years ago

Hi, any update on this? Or at least could you bump @next on NPM with the PR you mentioned @amanmahajan7 ? Thanks.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

rlreamy commented 6 years ago

Is there any update on this? It looks like it was supposed to be fixed in v4.

vellov commented 6 years ago

Any update on this?

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.