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

fix(ViroBase): fix onClick not working for <ViroText /> components #277

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

robertjcolley
Copy link
Collaborator

onClick was being sent to the native code as a prop incorrectly. This forces it to undefined, since we use the onClickViro to pass the onClick function to the native iOS code. I will note that other props not defined on ViroBase were not causing this crash, it was specific to onClick.

resolves #272

onClick was being sent to the native code as a prop incorrectly. This forces it to undefined, since we use the onClickViro to pass the onClick function to the native iOS code. I will note that other props not defined on ViroBase were not causing this crash, it was specific to onClick.

resolves #272
@robertjcolley robertjcolley self-assigned this Mar 6, 2024
@robertjcolley robertjcolley merged commit 07dc283 into main Mar 6, 2024
1 check passed
@robertjcolley robertjcolley deleted the 272-on-click-not-working branch March 6, 2024 19:36
@mattdfuchs
Copy link

@robertjcolley - I hate to say it, but I'm having the exact same problem in 2.41.1, but with ViroFlexView. The exact error is:

Error setting property 'onClick' of VRTFlexView with tag #349: Error setting property 'onClick' of VRTFlexView with tag #545: Exception thrown while executing UI block: -[VRTFlexView setOnClick:]: unrecognized selector sent to instance 0x105223800

At this point I'm just looking for an easy workaround. Problem doesn't happen if I don't define "onClick", but that's not very useful. I will try to post a better error later.

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

Successfully merging this pull request may close these issues.

onClick prop does not work
2 participants