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

Handling long press events #36

Open
pierpo opened this issue Nov 23, 2023 · 2 comments
Open

Handling long press events #36

pierpo opened this issue Nov 23, 2023 · 2 comments

Comments

@pierpo
Copy link
Member

pierpo commented Nov 23, 2023

Is your feature request related to a problem? Please describe.
We can't detect a long press right now.

Describe the solution you'd like

<SpatialNavigationNode isFocusable onLongSelect={() => {}} />

Describe alternatives you've considered
N/A

Additional context
N/A

@pierpo pierpo changed the title Handling the long press Handling long press events Nov 23, 2023
@fulminant
Copy link

+1. It would be a great feature.

@fulminant
Copy link

Investigated this issue a little bit, and I can say that it is not an easy task.
LRUD library doesn't handle long press events in any variant.
That means that to implement this feature we need to modify LRUD library and add longPress handle there and only after that implement it in SpatialNode.

We can use react-native Pressable component for example and see how it is accomplished there.
https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Pressability/Pressability.js
There are a lot of tricky moments in this code.

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

No branches or pull requests

2 participants