Flatlist反应本地不显示内容

时间:2018-11-23 20:40:08

标签: javascript android react-native mobx

单位列表本机不显示内容。

在仿真器运行中,但在ios或android中的Expo中,也不显示FlatLIst的内容。

Android/iOS Expo App

Emulator ios

@observer
export default class PartidosComponent extends Component {
  constructor(props) {
    super(props);
    this.state = {
      refreshing: false
    };
  }

  componentDidMount = () => {
    appstore.partidosstore.listadoPartidos();
  };

  onPress = plato => {
    //todo
  };

  onRefresh = () => {
    //todo
  };

  render() {
    var rows = appstore.partidosstore.partidos;
    return (
      <View styleName="content">
        <FlatList
          style={{ height: "100%" }}
          data={rows}
          keyExtractor={item => item.idPartido.toString()}
          refreshing={this.state.refreshing}
          onRefresh={this.onRefresh}
          renderItem={({ item }) => (
            ...
          )}
        />
      </View>
    );
  }
}

0 个答案:

没有答案