File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -73,18 +73,15 @@ const VirtualListOpen = forwardRef(
7373 menuEl : menuRefObject ?. current ,
7474 } ) ;
7575 } else {
76- // Fix for AWSUI-61506. Defer scroll to next frame to ensure
77- // virtual items are measured after re-render. When called from
78- // parent's useEffect, measurements may not be ready yet.
79- requestAnimationFrame ( ( ) => scrollToIndex ( index ) ) ;
76+ scrollToIndex ( index ) ;
8077 }
8178 }
8279 previousHighlightedIndex . current = index ;
8380 } ,
8481 [ firstOptionSticky , highlightType . moveFocus , scrollToIndex ]
8582 ) ;
8683
87- const stickySize = firstOptionSticky ? ( virtualItems [ 0 ] ? .size ?? 0 ) : 0 ;
84+ const stickySize = firstOptionSticky ? virtualItems [ 0 ] . size : 0 ;
8885 const withScrollbar = ! ! width && width . inner < width . outer ;
8986
9087 const idPrefix = useUniqueId ( 'select-list-' ) ;
You can’t perform that action at this time.
0 commit comments