fix(SelectPanel): auto scroll when list overflows#1247
Conversation
🦋 Changeset detectedLatest commit: 14e04c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-components/F7ydzWAWTsp2akUDDsXuoKaRoZk4 |
VanAnderson
left a comment
There was a problem hiding this comment.
Pulled it down to check it out, looks good to me 👍
10382e2 to
50511fc
Compare
50511fc to
7e2c169
Compare
|
From @dgreif in #1247 (comment):
I’d initially misinterpreted “selection” in “so that selection is always in view” as referring to the selected item (rather than referring to the active descendent), and was surprised to discover single selection I think this is non-blocking/out-of-scope. If this affects single selection |
|
@smockle great discovery! My initial implementation of scroll into view is focused on |

Currently, SelectPanel is allowing the list contents to overflow. This change brings back
overflow: autobehavior. It also addsscrollIntoViewthat will trigger when active descendant changes, so that selection is always in view. I also added an example to the docs so that behavior can be tested in Vercel.Closes https://github.com/github/primer/issues/169
Screenshots
Merge checklist