Skip to content

Commit 08c2a81

Browse files
committed
taking onPress from props outside of Gesture scope (#3389)
1 parent f2d72c7 commit 08c2a81

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/tabController/TabBarItem.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export default function TabBarItem({
134134
ignore,
135135
style,
136136
spreadItems,
137+
onPress,
137138
...props
138139
}: Props) {
139140
const {currentPage, setCurrentIndex} = useContext(TabBarContext);
@@ -207,7 +208,7 @@ export default function TabBarItem({
207208
setCurrentIndex(index);
208209
}
209210

210-
props.onPress && runOnJS(props.onPress)(index);
211+
onPress && runOnJS(onPress)(index);
211212
})
212213
.onFinalize(() => {
213214
isPressed.value = false;

0 commit comments

Comments
 (0)