We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a5715e commit 2b091eeCopy full SHA for 2b091ee
src/select/parts/virtual-list.tsx
@@ -74,7 +74,10 @@ const VirtualListOpen = forwardRef(
74
menuEl: menuRefObject?.current,
75
});
76
} else {
77
- scrollToIndex(index);
+ // Fix for AWSUI-61506. Defer scroll to next frame to ensure
78
+ // virtual items are measured after re-render. When called from
79
+ // parent's useEffect, measurements may not be ready yet.
80
+ requestAnimationFrame(() => scrollToIndex(index));
81
}
82
83
previousHighlightedIndex.current = index;
0 commit comments