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

onCellSelect #16

Open
ssomnoremac opened this issue Jul 12, 2016 · 1 comment
Open

onCellSelect #16

ssomnoremac opened this issue Jul 12, 2016 · 1 comment

Comments

@ssomnoremac
Copy link

Is onCellSelect hooked up? If so how is it used? How do you bind the instance of what is selected and shouldn't the cell be a touchable component?

@ssomnoremac
Copy link
Author

Ok, it is hooked up. I'm building out an alphabetized version of this where I hope to emulate the Android contacts page so I'm going to add it to the docs there but here is what's needed:

on your touch component (UserCell):

onPress={this.props.onSelect.bind(this)}

I brought the Cell into render of SectionableListView Component in as a Reusable Compoent like this:

const Cell = (props) => {
    <UserCell
      user = { props.item }
      onSelect = {props.onSelect} />
}
...
<SectionabletListView
        ...
        onCellSelect={this.onSelect}

... // outside render()
onSelect() { ...

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

1 participant