This repository was archived by the owner on Sep 19, 2024. It is now read-only.
Add virtuosoProps property to ReactSortableTree #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @nosferatu500 and @tianzhich, my original motivation for this PR was the need to track a
ReactSortableTree
's scroll position so that it could be restored after navigating away and back to its containing view. However, I just noticed #45, which should also be resolved by these changes.As you'll see, I've included a new Storybook page to demonstrate my
scrollTop
-tracking use case, along with a couple of new rows in the README's Props table (forvirtuosoProps
as well asvirtuosoRef
).I also needed to update
react-virtuoso
to the latest version in order to get access to theVirtuoso.getState()
method, and this caused the yarn.lock file to be modified rather extensively. Since this was done on MacOS 12.6.5 with Node 16.15.1, and I've not tested these changes in any other environment, you might want to verify that a freshyarn install
still works everywhere you expect it too.Finally, I'd like to get these changes published in a new release of this package (say, v4.4.0?) as soon as possible. Please let me know if there's anything I can do to help out with that.