Open duzliang opened 7 years ago
+1
+1
I have the same issue, but in case, the initial render is fine, but the subsequent ones are throwing this issue.
Same issue here.
On SelectableSectionsListView.js
on this part:
UIManager.measure(ReactNative.findNodeHandle(this.refs.view), (x, y, w, h) => {
this.containerHeight = h;
if (this.props.contentInset && this.props.data && this.props.data.length > 0) {
this.scrollToSection(Object.keys(this.props.data)[0]);
}
});
For some reason this.refs.view
is undefined, so UIManager.measure()
is executing with undefined param input.
The possible solution to avoid this problem is fix code by this way:
UIManager.measure(ReactNative.findNodeHandle(this.refs.view) || 0, (x, y, w, h) => {
this.containerHeight = h;
if (this.props.contentInset && this.props.data && this.props.data.length > 0) {
this.scrollToSection(Object.keys(this.props.data)[0]);
}
});
I will try submit a P.R, but for moment i'll create a fork and use this fork on package.json
"dependencies": {
"react-native-alphabetlistview": "github:joaom182/react-native-alphabetlistview#master"
}
react: 15.3.2 react-native: 0.37.0