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

action prop on ContextMenu.Trigger primitive has no type declaration & doesn't change behaviour #109

Open
KieranTH opened this issue Nov 2, 2024 · 6 comments

Comments

@KieranTH
Copy link

KieranTH commented Nov 2, 2024

Hey - Loving this project!

Got a small bug in the Context Menu - It seems like the action prop which is listed in the Documentation doesn't seem to function in the latest package for Zeego.

type '{ children: ReactNode; action: string; }' is not assignable to type 'IntrinsicAttributes & ContextMenuTriggerProps & RefAttributes<HTMLSpanElement>'.
  Property 'action' does not exist on type 'IntrinsicAttributes & ContextMenuTriggerProps & RefAttributes<HTMLSpanElement>'.

Ignoring the type error and applying press as the action value also doesn't change the behaviour of the press.

Cheers!

@nandorojo
Copy link
Owner

Hm yeah I think this prop is broken on iOS due to the upstream library.

@KieranTH
Copy link
Author

KieranTH commented Feb 8, 2025

Hm yeah I think this prop is broken on iOS due to the upstream library.

Hey!

Any updates on this? I'm currently bodging the use of a dropdown to circumvent this bug at the moment.

If you have any pointers on the potential dep/library that needs looking into, I can forward through the bug and progress it from there.

Thanks!

@nandorojo
Copy link
Owner

hey I don't think iOS natively supports this. for a single tap we will need to use dropdown menu instead of context menu for now. I think it only worked on a specific iOS version with a hack

@nandorojo
Copy link
Owner

We might need to remove this from the docs as I think it was using a native API that isn't working anymore.

@ChristopherGabba
Copy link

+1 also getting a TS error here.

Image

Note this was not an error in Zeego v2:
Image

@KieranTH
Copy link
Author

KieranTH commented Mar 7, 2025

+1 also getting a TS error here.

Image

Note this was not an error in Zeego v2:
Image

I believe this may be a cleanup for Zeego v3 - As the functionality of that prop didn't actually work anyway. So they may have removed the prop altogether

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

3 participants