Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot navigate onPress #69

Open
jameskim917 opened this issue May 30, 2022 · 1 comment
Open

Cannot navigate onPress #69

jameskim917 opened this issue May 30, 2022 · 1 comment

Comments

@jameskim917
Copy link

<HoldItem
            items={[
              { text: 'Edit', icon: 'pencil', onPress: (term, definition) => { navigation.navigate('EditWord', { term, definition }) } },
              { text: 'Delete', icon: 'trash', isDestructive: true, onPress: () => { } }
            ]}
            actionParams={{ Edit: [word.term, word.definition] }} bottom={true}
>

onPress is unable to navigate to another screen

@enesozturk
Copy link
Owner

I am able to use the navigation on both Android and iOS. Here is the demo.

const { goBack } = useNavigation();

const items = [
    {
      text: 'Home',
      icon: 'home',
      onPress: () => {
        goBack();
      },
    }
]
Screen.Recording.2022-07-20.at.01.14.43.mov

Do you think you're calling the navigation in the right place? Cannot repro and guess the problem with the current code snippets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants