-
Notifications
You must be signed in to change notification settings - Fork 163
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 callbak is not working #42
Comments
For the same problem, there is no solution to the problem. |
I do have same problem, i used cellProps to pass method to the CellComponent
|
same problem . I use render Function return the content instead of CellComponent. |
hello, you can refer to this example 👌 Exampleclass Cell extends Component {
render() {
return (
<TouchableHighlight onPress={() => this.props.onSelect(this.props.item)}>
<View style={{ height: 30 }}>
<Text>{this.props.item}</Text>
</View>
</TouchableHighlight>
);
}
}
//...
class MyComponent extends Component {
someFunction(value) {
console.log(value)
}
render() {
return (
<AlphabetListView
data={this.state.data}
cell={Cell}
cellHeight={30}
sectionListItem={SectionItem}
sectionHeader={SectionHeader}
sectionHeaderHeight={22.5}
onCellSelect={(value) => this.someFunction(value)} //<= onCellSelect()
/>
);
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<AlphabetListView
data={this.state.data}
cell={Cell}
cellHeight={30}
sectionListItem={SectionItem}
sectionHeader={SectionHeader}
sectionHeaderHeight={28.5}
onCellSelect={() => alert('Hello World')}
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: