The scrollToRowIndex prop found in the ReactDataGrid component doesn't seem to do anything.
That being said, for my purposes it would help immensely if I could set the initial scroll state of the grid (both x & y directions). If anyone from adazzle reads this, would it be possible to merge some changes regarding the setting the initial scroll state of the grid?
I'd like to work on those changes in the repo but want to make sure they would not be in vain. Thanks!
✅ Officially supported ✅
⚠️ Not officially supported, expect warnings ⚠️
☣️ Not officially supported, expect warnings and errors ☣️
✅ Officially supported ✅
⚠️ Not officially supported, but "should work" ⚠️
👋 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
Please include:
- What the current behavior is
- What the desired behvaior is
- (If Bug) Steps to reproduce the issue
- (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™
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.
Bump.
Also, I'll be able to look into this properly myself sometime next week.
Confirming that this prop seems to do nothing. I was able to work around this in componentDidMount using this technique: https://github.com/adazzle/react-data-grid/issues/661#issuecomment-312449548, but I would surely like to use scrollToRowIndex instead of dealing with the ref and dom for this.
scrollToRowIndex prop is removed in v7 canary. You can use the new scrollToRow method
https://github.com/adazzle/react-data-grid/blob/canary/CHANGELOG.md
https://adazzle.github.io/react-data-grid/canary/?path=/story/demos--scroll-to-row
https://github.com/adazzle/react-data-grid/blob/canary/stories/demos/ScrollToRow.tsx#L45
Most helpful comment
Confirming that this prop seems to do nothing. I was able to work around this in componentDidMount using this technique: https://github.com/adazzle/react-data-grid/issues/661#issuecomment-312449548, but I would surely like to use scrollToRowIndex instead of dealing with the ref and dom for this.