Skip to content

fix: selected item scrolls into view in rac select story #8230

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

Merged
merged 2 commits into from
May 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions packages/react-aria-components/stories/Select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@ export const AsyncVirtualizedCollectionRenderSelect = (args) => {
{list.isLoading && <LoadingSpinner style={{right: '20px', left: 'unset', top: '0px', height: '100%', width: 20}} />}
<span aria-hidden="true" style={{paddingLeft: 25}}>▼</span>
</Button>
<Popover>
<OverlayArrow>
<svg width={12} height={12}><path d="M0 0,L6 6,L12 0" /></svg>
</OverlayArrow>
<Virtualizer
layout={ListLayout}
layoutOptions={{
rowHeight: 25,
loaderHeight: 30
}}>
<Virtualizer
layout={ListLayout}
layoutOptions={{
rowHeight: 25,
loaderHeight: 30
}}>
<Popover>
<OverlayArrow>
<svg width={12} height={12}><path d="M0 0,L6 6,L12 0" /></svg>
</OverlayArrow>
<ListBox className={styles.menu}>
<Collection items={list.items}>
{item => (
Expand All @@ -163,8 +163,8 @@ export const AsyncVirtualizedCollectionRenderSelect = (args) => {
</Collection>
<MyListBoxLoaderIndicator isLoading={list.loadingState === 'loadingMore'} onLoadMore={list.loadMore} />
</ListBox>
</Virtualizer>
</Popover>
</Popover>
</Virtualizer>
</Select>
);
};
Expand Down