Repository navigation
Conversation
* Prevent layout calculation on initial mount if scrollTop/scrollLeft is 0 * Prevent cascading state update for the same case as above.
wuweiweiwu
left a comment
There was a problem hiding this comment.
hi @tokafish, you have committed the whole dist directory. this make it difficult for me to review this MR. please add it back into the gitignore
This reverts commit f1f7f4a.
|
@wuweiweiwu updated, sorry about that! |
|
@wuweiweiwu Hey - just wanted to check in on this - thanks! |
|
#1290 any thinking on this dude? thanks @wuweiweiwu |
|
@wuweiweiwu Just checking in again - thanks! |
|
Will take a look soon! |
| if ( | ||
| (typeof scrollLeft === 'number' && scrollLeft >= 0) || | ||
| (typeof scrollTop === 'number' && scrollTop >= 0) | ||
| (typeof scrollLeft === 'number' && scrollLeft > 0) || |
| if (this._scrollingContainer) { | ||
| // setting the ref's scrollLeft and scrollTop. | ||
| // Somehow in MultiGrid the main grid doesn't trigger a update on mount. | ||
| if (this._scrollingContainer.scrollLeft !== this.state.scrollLeft) { |
There was a problem hiding this comment.
why do we check if the scrollLeft is 0 again here?
|
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 |
First off, thanks for all your work on this library!
I've been trying to optimize the initial mount of a react app, and noticed a few spots where I thought an improvement to react-virtualized might help.
I'll follow up this PR with all of the items in the checklist, but I wanted to get your thoughts on what you thought of this change. Thanks!