Skip to content

Commit 3ff19eb

Browse files
committed
fix: 🐛 解决Wheel选择器选择日期会出现onChange没有回调的问题!
1 parent 47723c3 commit 3ff19eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/WheelPicker/WheelNativePicker/wheel-picker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const WheelPicker: React.FC<Props> = ({
8282
onChange(value);
8383
clearTimeout(timerRef.current!);
8484
timerRef.current = undefined;
85-
}, 100);
85+
}, 50);
8686
}
8787
};
8888

@@ -144,6 +144,7 @@ const WheelPicker: React.FC<Props> = ({
144144
scrollEventThrottle={16}
145145
onScroll={scrollEvent}
146146
snapToOffsets={offsets}
147+
onMomentumScrollEnd={handleScrollEnd}
147148
decelerationRate={decelerationRate}
148149
initialScrollIndex={selectedIndex}
149150
getItemLayout={(_, index) => ({

0 commit comments

Comments
 (0)