react-native-card-stack-swiper
react-native-card-stack-swiper copied to clipboard
Rerender removing keyboard
Environment
Android 7.0 IOS 14.1.4 Expo ^31.0.2 react 16.5.0
Bug
Consistent across both IOS and Android. If you update the stack from inside the CardStack the keyboard will be dismissed.
Example (Pseudo code, not tested)
class Example extends Component {
constructor() {
super();
this.state = {
text: "0"
};
}
render() {
return(
<CardStack
style={{ flex: 1, alignItems: "center" }}
renderNoMoreCards={() => <View />}
>
<Card>
<View
style={{
width: Dimensions.get("window").width,
height: Dimensions.get("window").height
}}
>
<TextInput
onChangeText={score => this.state.setState(text: score)}
value={this.props.text}
/>
</View>
</Card>
<Card>
<View />
</Card>
</CardStack>
);
}
}