react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

Header Size jumping when using hooks

Open LBWright opened this issue 7 years ago • 4 comments

  • Have you already searched for similar issues? Please help us out and double-check first!

  • Also, please don't be that person who deletes this template. It's here for a reason.

  • Thanks!


Which version of React JS are you using?

✅ Officially supported ✅

  • [ ] v15.4.x

⚠️ Not officially supported, expect warnings ⚠️

  • [ ] v15.5.x
  • [ ] v15.6.x

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

  • [x] v16.8.x

Which browser are you using?

✅ Officially supported ✅

  • [ ] IE 9 / IE 10 / IE 11
  • [ ] Edge
  • [x] Chrome

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

  • [ ] Firefox
  • [ ] Safari

I'm submitting a ...

  • [x] 🐛 Bug Report
  • [ ] 💡 Feature Request

👋 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

Please include:
- What the current behavior is
  When resizing columns when DraggableContainer parent component wraps the React Data Grid, the size of the header jumps 20-70px, on click.
- What the desired behvaior is
  The header should not resize until the user moves the mouse.
- (If Bug) Steps to reproduce the issue
  Wrap the ReactDataGrid with the DraggableContainer, and use React hooks to update the columns.
- (If Feature) The motivation / use case for the feature

We especially love screenshots / videos of problems, and remember
The Best Issue Is A Pull Request™

It's hard to get a screenshot of the issue. It's completely possible that it's our implementation, but going through the values inside of the VSCode debugger, we notice that the size of the window immediately changes inside of the react-data-grid functions themselves.

LBWright avatar Apr 12 '19 19:04 LBWright

I think this is related to https://github.com/adazzle/react-data-grid/pull/1421 Are you experiencing this on 6.x ? https://github.com/adazzle/react-data-grid/pull/1564

ggcatu avatar Apr 23 '19 09:04 ggcatu

Yes. The version I'm experiencing this on is 6.1.0-0.

LBWright avatar Apr 23 '19 20:04 LBWright

@ggcatu This is exactly it. Thanks!

LBWright avatar Apr 23 '19 20:04 LBWright

We have re-implemented header resize in v7 canary. Can you give it a try and open a new issue if it still exists? https://adazzle.github.io/react-data-grid/canary/?path=/story/demos--common-features https://github.com/adazzle/react-data-grid/tree/canary/stories

amanmahajan7 avatar Oct 27 '20 10:10 amanmahajan7