diff --git a/native/tooltip/tooltip-context.react.js b/native/tooltip/tooltip-context.react.js --- a/native/tooltip/tooltip-context.react.js +++ b/native/tooltip/tooltip-context.react.js @@ -117,8 +117,15 @@ ); const onPressAction = (selectedIndex: ?number) => { - const index = selectedIndex ?? 0; - filteredOptions[index].onPress(); + if ( + selectedIndex === null || + selectedIndex === undefined || + selectedIndex < 0 + ) { + cancel(); + return; + } + filteredOptions[selectedIndex].onPress(); }; const containerStyle = {