React Native Button не работает при вложении - PullRequest
0 голосов
/ 18 ноября 2018

Только что начал с реагировать на родной, и я не могу заставить работать кнопку. Кнопка 1 работает как положено, но кнопка 2 вложена и не работает

`` `import {StyleSheet, View, Text, Button,TouchableHighlight} от "реагировать-родной";import {Col, Row, Grid} из "response-native-easy-grid";

sayHi = from => {
    alert(from + " was clicked");
  };

  render() {
    return (
      <View style={styles.container}>
        <Button
          title="BUTTON 1"
          accessibilityLabel="THIS IS BUTTON 1"
          onPress={() => {
            this.sayHi("Button 1");
          }}
        />
        <Grid>
          <Col>
            <Text> col 1</Text>
            <TouchableHighlight
              style={{
                height: 40,
                width: 100
              }}
              onPress={() => {
                this.sayHi("highlight");
              }}
              underlayColor="red"
            >
              <Button
                title="BUTTON 2"
                accessibilityLabel="THIS IS BUTTON 2"
                onPress={() => {
                  this.sayHi("Button 2");
                }}
              />
            </TouchableHighlight>
          </Col>
          <Col>
          </Col>
        </Grid>
      </View>
    );
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...