From c0582646fcbd25b1eb9415a55f8d05864ad4470a Mon Sep 17 00:00:00 2001 From: Soon Wang Date: Thu, 25 Jun 2026 14:50:26 +0800 Subject: [PATCH] fix(rn): synchronize offsetYShared with itemRawH for correct wheel animation rendering --- .../components/react/mpx-picker-view-column/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/webpack-plugin/lib/runtime/components/react/mpx-picker-view-column/index.tsx b/packages/webpack-plugin/lib/runtime/components/react/mpx-picker-view-column/index.tsx index 32512ce4c8..e47f30f760 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/mpx-picker-view-column/index.tsx +++ b/packages/webpack-plugin/lib/runtime/components/react/mpx-picker-view-column/index.tsx @@ -136,6 +136,16 @@ const _PickerViewColumn = forwardRef, } }, []) + // `contentOffset` prop sets visual position but does not fire scroll events, + // so `offsetYShared` (from `useScrollViewOffset`) stays at 0 until the user scrolls. + // Directly sync it whenever `itemRawH` is established so wheel animation renders correctly. + useEffect(() => { + if (!itemRawH || dragging.current || scrolling.current) { + return + } + offsetYShared.value = activeIndex.current * itemRawH + }, [itemRawH]) + useEffect(() => { if ( !scrollViewRef.current ||