Skip to content

Commit 907517c

Browse files
committed
fix(knob): disable pointer events
1 parent b2c1e73 commit 907517c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/src/components/KnobContainer.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React, {
44
useImperativeHandle,
55
type PropsWithChildren,
66
} from 'react'
7-
import {type ViewProps} from 'react-native'
7+
import {StyleSheet, type ViewProps} from 'react-native'
88
import Animated, {
99
useAnimatedStyle,
1010
useSharedValue,
@@ -106,7 +106,7 @@ const KnobContainer = forwardRef<KnobContainerRef, KnobContainerProps>(
106106
handleTapEnd()
107107
}
108108
}}
109-
style={animatedStyles}
109+
style={[styles.disablePointer, animatedStyles]}
110110
onLayout={onLayout}>
111111
{children}
112112
</Animated.View>
@@ -115,6 +115,12 @@ const KnobContainer = forwardRef<KnobContainerRef, KnobContainerProps>(
115115
},
116116
)
117117

118+
const styles = StyleSheet.create({
119+
disablePointer: {
120+
pointerEvents: 'none',
121+
},
122+
})
123+
118124
KnobContainer.displayName = 'KnobContainer'
119125

120126
export default KnobContainer

0 commit comments

Comments
 (0)