Repository navigation
Conversation
… allow scrolling to cells but offset by some pixels
|
How do I reopen? |
|
@bvaughn Hiya how do I reopen? Issue is still relevant and was hoping to hear back but there’s a stale bot that seems to close indiscriminately after 28 days 😬 Thanks |
|
Sorry for the very long delay in getting back to you about this! I've just finished a large update for version 10 of react-virtualized (#1900): the library has been rewritten in TypeScript, every component is now a function component (React 18+ is required), and the source moved from If you're still interested in this change, I'd welcome a new PR with it rebased onto the |
npm test) all passyarn run prettier).yarn run typecheck).NOTE: AI was used to help build the tests and also to check some of the initial basic work I did for this and fill in some gaps.
This might be something to discuss and it was quick to mock up. It's a feature I found us needing.
Essentially we have WindowScroller, AutoSizer and List. We have a sticky navigation at the top of the page. Using scrollToRow / scrollToCell was problematic as it was hiding the cell underneath the sticky navigation. We needed a way to essentially tell the virtualiser that we need cell X to start 30 pixels down the page. In other words offset by
-30.I chose not to mess with alignment (could it be a number for example that becomes offset) as it seems more flexible with a new property. You can use the offset in coordination with any value. For example if you had a footer that floated above content you could still use
endand an offset to prevent it appearing underneath it.Open to discussion here and if there's other approaches but this seemed relatively straight forward and a good enhancement - but of course I would when I benefit from it! :)