Closed coderdave closed 7 years ago
@coderdave I haven't seen that one before. Can you provide some example code of how you are using the scrollview?
Thanks for getting back with me so quickly. The code isn't complicated, here's the gist of it.
<ScrollView style={styles.dayContentView}
bounces={true}
contentContainerStyle={{width: this.state.store.contentContainerWidth, height: this.state.store.contentContainerHeight}}
directionalLockEnabled={true}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={true}
>
<ScrollViewChild scrollDirection={'both'}>
<For each="timeSlot" of={this.state.store.timeSlots} index="timeSlotIndex">
<View key={timeSlot} style={{flexDirection: 'row'}}>
<View style={[styles.timeTextView, {borderBottomWidth: timeSlot === this.state.store.timeSlotEnd ? 1 : null}]}>
...
</View>
<View style={[styles.emptyApptSlotWrapper, {borderBottomWidth: timeSlot === this.state.store.timeSlotEnd ? 1 : null}]}>
...
</View>
</View>
<For each="appointment" of={this.state.store.appointments}>
<If condition={appointment[`start${timeSlot}`]}>
<TouchableHighlight
style={[styles.apptStartBox, {top: timeSlotIndex * 32, height: appointment.height, left: appointment.left}, styles[`${appointment.status}`]]}
onPress={_ => this.openAppointmentView(appointment.id)} underlayColor={this.getApptUnderlayColor(appointment)}
key={appointment.id}>
<View>
...
</View>
</TouchableHighlight>
</If>
</For>
</For>
</ScrollViewChild>
</ScrollView>
@coderdave I can't repro this one I'm afraid. Are you still getting the error?
I haven't received that error in a while, maybe it was something else.
Sometimes I get this error: "The specified child already has a parent. You must call removeView() on the child's parent first."
I don't remember getting this error before using this library. Is it related to this library?