-
Notifications
You must be signed in to change notification settings - Fork 23
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
ContextMenuView doesn't re-render properly on tab navigation #65
Comments
hi, thank you for submitting an issue; i’ll try to debug this in the weekend ahakhskdkffkfjl this might be (another) bug with the cleanup logic, or maybe the changes to the menuConfig prop is not being detected? hopefully, it’s not too hard to fix |
It's possible this is due to |
@PierrotAWB can you try adding this to the child of the context menu: <Pressable delayLongPress={100} onLongPress={() => {}}>
{child}
</Pressable> |
First, thanks to those who've worked on this library. Aside from this singular problem, it's been a pleasure working in it.
I'm facing an issue which is similar to, but as far as I can tell, distinct from #34.
The goal is to implement a 'like' button on a
ContextMenuView
. Each time the button's clicked, it toggles a state variable and the UI should update accordingly. This change should persist even as the menu's hidden (if I 'like', then hide the menu and open it again, it should still indicate that I've 'liked').I've produced a minimal example to illustrate the problem: although the button works initially, as soon as I navigate to another tab and back, it stops re-rendering properly. Both the UI and a
console.log()
I've included in the code indicate that the state variable (favourite
) holds the correct value at all times. The issue is that it's no longer the case that clicking 'like' is immediately reflected in the UI (the menu does not re-render properly).minimal.mov
Environment:
The text was updated successfully, but these errors were encountered: