react-native-card-stack-swiper icon indicating copy to clipboard operation
react-native-card-stack-swiper copied to clipboard

Rerender removing keyboard

Open Allcharles opened this issue 6 years ago • 0 comments

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>
    );
  }
}

Allcharles avatar Feb 22 '19 15:02 Allcharles