Draggable and Resizable columns Visually expands width to a max limit and then starts to resize.
-
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.x.x
Which browser are you using?
✅ Officially supported ✅
- [x] 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
Draggable and Resizable columns Visually expands width to a max limit and then starts to resize.
- What the desired behvaior is
While resizing both draggable and resizable columns, it shouldn't modify the width of the column. It should change the width as we are resizing the column.
- (If Bug) Steps to reproduce the issue
Define you column with a fixed width and set Draggable: true and resizable: true.
Now, click on the right edge of the column and start dragging.
You will see the width expands to the right most and then starts to resize as you resize the
column.
Please see attached video.
- (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™
@amanmahajan7 @tenpaiyomi @jpdriver , @malonecj
Please find an onscreen recording. https://www.useloom.com/share/2026ac6326ca47229c88228b07c11b07
It needs to be investigated. It seems like an issue related to column width and size calculation
https://github.com/adazzle/react-data-grid/blob/master/packages/react-data-grid/src/HeaderCell.js#L58
@amanmahajan7 , I just tried a fixed and it works.
Like you said in HeaderCell.js
const left = ReactDOM.findDOMNode(this).getBoundingClientRect().left;
in reactJS documentation, they say not to use findDOMNode. If you set a column to Draggable, it gets wrapped inside a div with width:0. So, when it looks for .left(), it gives a wrong value.
So, I replaced it with this.
const left = document.getElementsByClassName('react-grid-HeaderCell--resizing')[0].getBoundingClientRect().left;
It looks good. Please feel free Share your comments.
@madhan-dhamodaran see this https://github.com/adazzle/react-data-grid/pull/1414/files
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.
I have the fix for this and I will raise a PR as part of my other issues
I have raised a PR for this. Awaiting merge. #1449
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.
I have raised a PR for this. Awaiting merge. #1449
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.
I have raised a PR for this. Awaiting merge. #1449
Any updates?
I have opened a new PR for this which implements the same change as @madhan-dhamodaran but separated into one PR. @amanmahajan7 has indicated in #1449 that if this was separated off, it could be approved.
I am running into this issue as well. In what version will this be fixed?
@john-fowler They are not going to be fixing this. They are working on the next version. If you look at the discussion on my PR, here, he explains more. If you need to fix this for yourself, you can fork and use the fix in this commit, here
This is fixed in v7 canary
https://github.com/adazzle/react-data-grid/blob/canary/CHANGELOG.md https://adazzle.github.io/react-data-grid/canary/?path=/story/demos--columns-reordering https://github.com/adazzle/react-data-grid/blob/canary/stories/demos/ColumnsReordering.tsx
@amanmahajan7 Have you guys established any timetables for v7 beta and GA? We'd love to upgrade, but can't use a canary version in production.
Are you managing a public task list anywhere that I could contribute to?