@mpxjs/webpack-plugin 2.10.18-beta.5 → 2.10.18-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,6 +73,15 @@ const _PickerViewColumn = forwardRef((props, ref) => {
73
73
  clearTimerScrollTo();
74
74
  };
75
75
  }, []);
76
+ // `contentOffset` prop sets visual position but does not fire scroll events,
77
+ // so `offsetYShared` (from `useScrollViewOffset`) stays at 0 until the user scrolls.
78
+ // Directly sync it whenever `itemRawH` is established so wheel animation renders correctly.
79
+ useEffect(() => {
80
+ if (!itemRawH || dragging.current || scrolling.current) {
81
+ return;
82
+ }
83
+ offsetYShared.value = activeIndex.current * itemRawH;
84
+ }, [itemRawH]);
76
85
  useEffect(() => {
77
86
  if (!scrollViewRef.current ||
78
87
  !itemRawH ||
@@ -136,6 +136,16 @@ const _PickerViewColumn = forwardRef<HandlerRef<ScrollView & View, ColumnProps>,
136
136
  }
137
137
  }, [])
138
138
 
139
+ // `contentOffset` prop sets visual position but does not fire scroll events,
140
+ // so `offsetYShared` (from `useScrollViewOffset`) stays at 0 until the user scrolls.
141
+ // Directly sync it whenever `itemRawH` is established so wheel animation renders correctly.
142
+ useEffect(() => {
143
+ if (!itemRawH || dragging.current || scrolling.current) {
144
+ return
145
+ }
146
+ offsetYShared.value = activeIndex.current * itemRawH
147
+ }, [itemRawH])
148
+
139
149
  useEffect(() => {
140
150
  if (
141
151
  !scrollViewRef.current ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.10.18-beta.5",
3
+ "version": "2.10.18-beta.6",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"