-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Allow scrolling of individual elements #10468
Open
joshkel
wants to merge
11
commits into
remix-run:dev
Choose a base branch
from
joshkel:element-scroll-restoration
base: dev
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+111
−10
Open
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c570fb4
Allow scrolling of individual elements
joshkel 8af9a2b
Update contributors.yml / sign CLA
joshkel f3c131d
Support CSS selector + add docs
brophdawg11 d0ef32d
Bump bundle
brophdawg11 2db12d2
Merge branch 'dev' into element-scroll-restoration
brophdawg11 a3293c8
const -> function
brophdawg11 8d23c47
Add changeset
brophdawg11 870c0d0
Update docs/components/scroll-restoration.md
brophdawg11 dafe0e1
Update docs/components/scroll-restoration.md
brophdawg11 3f2c204
Update docs/components/scroll-restoration.md
brophdawg11 b1bbd43
Fix check for saved positions
brophdawg11 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"react-router-dom": minor | ||
--- | ||
|
||
Add `<ScrollRestoration scrollContainer>` prop to support scrolling on elements other than `window` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,7 @@ | |
- jmargeta | ||
- johnpangalos | ||
- jonkoops | ||
- joshkel | ||
- jrakotoharisoa | ||
- kachun333 | ||
- kantuni | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if there's simple guidance about whether to prefer ref or selector that fits in a sentence, but if there is, it would be good to add it. I feel
ref
is safer and easier to be confident about. But maybe people can figure that out.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, hard to say. I sort of envisioned refs being used more when the scrollable thing is easily accessible from the component rendering
<ScrollRestoration>
and selectors if it's a few components away and you don't want to prop-drill a ref around. But I'm not sure if one is technically any better than another?