Skip to content

Commit dcc7bd6

Browse files
authored
Add onChange to dependency array (#1391)
1 parent 5560b6f commit dcc7bd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/incubator/WheelPicker/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const WheelPicker = React.memo(({
152152

153153
const {index, value} = getRowItemAtOffset(event.nativeEvent.contentOffset.y);
154154
onChange?.(value, index);
155-
}, []);
155+
}, [onChange]);
156156

157157
const renderItem = useCallback(({item, index}) => {
158158
return (

0 commit comments

Comments
 (0)