Commit e62525e
authored
add manualActivation prop (#3923)
## Description
`manualActivation` prop was missing in v3, this PR adds it.
## Test plan
<details>
```tsx
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { GestureHandlerRootView, GestureDetector, usePanGesture } from 'react-native-gesture-handler';
export default function TwoPressables() {
const pan = usePanGesture({
onActivate: (e) => { console.log(e) },
disableReanimated: true,
manualActivation: true,
runOnJS: true,
});
return (
<GestureHandlerRootView>
<View style={styles.root}>
<GestureDetector gesture={pan}>
<View style={styles.outer}>
<Text style={styles.label}>Pan</Text>
</View>
</GestureDetector>
</View>
</GestureHandlerRootView>
);
}
const styles = StyleSheet.create({
root: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#f7f7f7',
},
outer: {
padding: 20,
backgroundColor: '#ddd',
borderRadius: 12,
marginBottom: 50
},
label: {
fontSize: 18,
marginBottom: 10,
},
})
```
</details>1 parent ef4a33e commit e62525e
File tree
2 files changed
+2
-0
lines changed- packages/react-native-gesture-handler/src/v3
- hooks/utils
- types
2 files changed
+2
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
0 commit comments