Conversation
|
Thank you - it works correctly on my system. Regarding the code quality: I noticed that several fallback paths were included to infer which new APIs react-window v2 might use. Now that the working APIs are known, those conditional branches can be removed. Please also remove the code comments. Thanks again. |
584c5a8 to
d9631b6
Compare
Yes, sorry, that actually reminds me that there is still a regression when navigating back the scroll position isn't being restored. I'll have to fix that before being ready. Shouldn't finish code like this late at night, sorry ^^' |
|
No problem. Thanks for the PR :) |
|
Hi @RayJW While implementing #466, I also migrated to react-window v2. Everything is running fine now, except for two things:
I’m sorry that I ended up doing most of the work and couldn’t merge yours. Re-basing after the #466 changes would have been a nightmare. If you’re up for it, I would really appreciate help with restoring the scroll offset/position after leaving the editor. Thank you! |
I feel you, this has been most of the work for me as well.
Dw about it, I'm happy this can be moved along any way :)
From what I gathered in the docs, the best possible way would be storing the number of the first row in view and then restoring that with the |
This is my 2nd attempt at getting this done. I was able to remove autosizer and follow the new recommended way of doing things according to the
react-windowguide. At least in my testing on Linux, all the functionality is the same while getting rid of dependencies and finally adopting the newer API for react-window. As always, please test if these changes also work for you.Some sizing logic had to be changed, but I made sure that it's still reactive while making things faster (from my limited comparison of render times). I left some comments for a few things I stumbled on while developing this, but if it's preferred, I can remove them before merging.