WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Jun 24, 2021. It is now read-only.
This repository was archived by the owner on Jun 24, 2021. It is now read-only.

onPress not working for children #55

@kirtan96

Description

@kirtan96

I have the following code:
<SelectableText selectable={true} menuItems={["Add to note", "Comment"]} onSelection={(props) => { console.log(props) alert(props.eventType + ": " + props.content) }} style={{margin: 20}} appendToChildren={ <Text> Hello <Text onPress={() => alert('Hello World')} style={{fontWeight: 'bold'}}>World</Text> </Text> } />
Screen Shot 2020-06-13 at 6 43 56 PM

and it outputs the text correctly, however, the onPress of Text component (on word: "World") does not work. If I were to have same "Hello World" Text Component outside of SelectableTextComponent, the onPress works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions