File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -270,11 +270,9 @@ const Slider = React.memo((props: Props) => {
270
270
} , [ value , setInitialPositions ] ) ;
271
271
272
272
useEffect ( ( ) => {
273
- if ( ! thumbStyle ) {
274
- _thumbStyle . value = StyleUtils . unpackStyle ( defaultThumbStyle , { flatten : true } ) ;
275
- }
273
+ _thumbStyle . value = StyleUtils . unpackStyle ( thumbStyle ? customThumbStyle : defaultThumbStyle , { flatten : true } ) ;
276
274
// eslint-disable-next-line react-hooks/exhaustive-deps
277
- } , [ defaultThumbStyle , thumbStyle ] ) ;
275
+ } , [ defaultThumbStyle , customThumbStyle , thumbStyle ] ) ;
278
276
279
277
const onValueChangeThrottled = useCallback ( _ . throttle ( value => {
280
278
if ( ! didValueUpdate . current ) { // NOTE: don't invoke onValueChange when slider's value prop updated programmatically
You can’t perform that action at this time.
0 commit comments