Skip to content

Commit 0b589ea

Browse files
authored
fix: incorrect onPress called with overflowMenuPressHandlerActionSheet (vonovak#141)
1 parent 2fca2fd commit 0b589ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ The package exports common handlers you can use, but you can provide your own to
137137
| accessibilityLabel?: string | | 'More options' by default |
138138
| left?: boolean | whether the `OverflowMenu` is on the left from header title | false by default, it just influences styling. No need to pass this if you already passed it to `HeaderButtons`. |
139139
| children: React.Node | the overflow items | typically `HiddenItem`s, please read the note below |
140-
| ...TouchableProps | props passed to the nested Touchable | pass eg. `pressColor` to control ripple color on Android |
140+
| other props | props passed to the nested Touchable | pass eg. `pressColor` to control ripple color on Android |
141141

142142
##### Important note
143143

src/overflowMenuPressHandlers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const overflowMenuPressHandlerActionSheet = ({
8686
},
8787
(buttonIndex: number) => {
8888
if (buttonIndex > 0) {
89-
hiddenButtons[buttonIndex - 1].onPress();
89+
enabledButtons[buttonIndex - 1].onPress();
9090
}
9191
}
9292
);

0 commit comments

Comments
 (0)