-
Notifications
You must be signed in to change notification settings - Fork 241
Description
This issue description might be a bit vague, but in our app, the calendar disappeared (shows nothing) on Android after upgrading both to RN 0.50.3 and react-native-calendar to 0.13.1.
After some investigation, we think that this code causes the error:
if (this.state.containerWidth == null) {
return <View onLayout={this.onContainerLayout} style={containerStyle} />;
}
The theory is that onContainerLayout doesn't get width and height, or doesn't run at all. We haven't verified this though, hence vague :)
We set width and height on containerStyle and suddenly the calendar appears.
This was not a problem with RN 0.44.2 and react-native-calendar@0.10.0 on Android. We were unable to test versions between 0.10.0 and the latest, since only the latest imports prop-types from its own package, instead of from the 'react' package.
We haven't tested it with other versions of RN either, because time :)
Sorry about not writing an awesome issue, but I thought it was better to report it like this, rather than not at all.