Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid: Scroll to row/column only #173

Closed
jgoz opened this issue Mar 12, 2019 · 1 comment
Closed

Grid: Scroll to row/column only #173

jgoz opened this issue Mar 12, 2019 · 1 comment
Labels
😎 enhancement New feature or request

Comments

@jgoz
Copy link
Contributor

jgoz commented Mar 12, 2019

For FixedSizeGrid and VariableSizeGrid, is there a way to only scroll to a particular row OR column index?

I.e., scroll to row 50 while maintaining the current horizontal scroll position.

This kind-of works with FizedSizeGrid by using scrollToItem({ rowIndex: 50, columnIndex: -1 }), but I'm thinking this just happens to work and is not valid. Trying the same with VariableSizeGrid causes an exception.

Specifying columnIndex: 0 works if the first column does not overflow the outer container, but if it is wider than the container, it will alternate between scrolling to the end of that column and the beginning of the column with align: "auto".

The ideal scenario for my use case would be making rowIndex and columnIndex optional. If either one is not specified, then scrollLeft or scrollTop would not be changed from the previous value.

If you would accept a PR for this suggestion I'd be happy to open it.

@bvaughn
Copy link
Owner

bvaughn commented Mar 12, 2019

I'd be happy to review a PR if it includes all of the following:

  • Minimal impact on bundle size (should probably only add two conditionals really)
  • Includes tests
  • Includes documentation changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😎 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants