File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ export default function App() {
88 < View style = { styles . container } >
99 < RulerPicker
1010 min = { 0 }
11+ unit = "cm"
1112 max = { 240 }
1213 step = { 1 }
1314 fractionDigits = { 0 }
1415 initialValue = { 0 }
1516 onValueChange = { ( number ) => console . log ( 'onValueChange' , number ) }
1617 onValueChangeEnd = { ( number ) => console . log ( 'onValueChangeEnd' , number ) }
17- unit = "cm"
1818 />
1919 </ View >
2020 ) ;
Original file line number Diff line number Diff line change @@ -258,14 +258,13 @@ export const RulerPicker = ({
258258 step ,
259259 ]
260260 ) ;
261- const onContentSizeChange = useCallback ( ( ) => {
261+ function onContentSizeChange ( ) {
262262 const initialIndex = Math . floor ( ( initialValue - min ) / step ) ;
263263 listRef . current ?. scrollToOffset ( {
264264 offset : initialIndex * ( stepWidth + gapBetweenSteps ) ,
265265 animated : false ,
266266 } ) ;
267- // eslint-disable-next-line react-hooks/exhaustive-deps
268- } , [ ] ) ;
267+ }
269268
270269 return (
271270 < View style = { { width, height } } >
You can’t perform that action at this time.
0 commit comments