FAB本机库未显示在Flatlist-renderItem

时间:2020-02-15 14:53:59

标签: react-native react-native-flatlist native-base

我想基于numColumns显示多个FAB 无法在Flatlist中呈现FAB对象

 <View style={styles.search_field_container}>
              <FlatList
                data={formatData(this.state.users, numColumns)}
                numColumns={numColumns}
                keyExtractor={item => item.id}
                renderItem={({item}) => this.renderitem(item)}
              />

renderitem = item => {
    return (
      <Container>
        <Header />
        <View style={{ flex: 1 }}>
          <Fab
            active={this.state.active}
            direction="up"
            containerStyle={{ }}
            style={{ backgroundColor: '#5067FF' }}
            position="bottomRight"
            onPress={() => this.setState({ active: !this.state.active })}>
            <Icon name="share" />
            <Button style={{ backgroundColor: '#34A34F' }}>
              <Icon name="logo-whatsapp" />
            </Button>
            <Button style={{ backgroundColor: '#3B5998' }}>
              <Icon name="logo-facebook" />
            </Button>
            <Button disabled style={{ backgroundColor: '#DD5144' }}>
              <Icon name="mail" />
            </Button>
          </Fab>
        </View>
      </Container>
    );
  };
}

0 个答案:

没有答案