File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,20 @@ const Slider = React.memo((props: Props) => {
345
345
}
346
346
} , [ ] ) ;
347
347
348
+ const _onSeekStart = ( ) => {
349
+ 'worklet' ;
350
+ if ( onSeekStart ) {
351
+ runOnJS ( onSeekStart ) ( ) ;
352
+ }
353
+ } ;
354
+
355
+ const _onSeekEnd = ( ) => {
356
+ 'worklet' ;
357
+ if ( onSeekEnd ) {
358
+ runOnJS ( onSeekEnd ) ( ) ;
359
+ }
360
+ } ;
361
+
348
362
// @ts -expect-error should be fixed in version 3.5 (https://github.com/software-mansion/react-native-reanimated/pull/4881)
349
363
const trackAnimatedStyles = useAnimatedStyle ( ( ) => {
350
364
if ( useRange ) {
@@ -360,7 +374,6 @@ const Slider = React.memo((props: Props) => {
360
374
} ) ;
361
375
362
376
/** renders */
363
-
364
377
const renderThumb = ( type : ThumbType ) => {
365
378
return (
366
379
< Thumb
@@ -369,8 +382,8 @@ const Slider = React.memo((props: Props) => {
369
382
offset = { type === ThumbType . DEFAULT ? defaultThumbOffset : rangeThumbOffset }
370
383
gap = { rangeGap }
371
384
secondary = { type !== ThumbType . DEFAULT }
372
- onSeekStart = { onSeekStart }
373
- onSeekEnd = { onSeekEnd }
385
+ onSeekStart = { _onSeekStart }
386
+ onSeekEnd = { _onSeekEnd }
374
387
shouldDisableRTL = { shouldDisableRTL }
375
388
disabled = { disabled }
376
389
disableActiveStyling = { disableActiveStyling }
You can’t perform that action at this time.
0 commit comments