react-native-collapsible icon indicating copy to clipboard operation
react-native-collapsible copied to clipboard

FlatList-Collapsible, When FlatList data is sorted, doesn't seen content of collapsible.

Open seckinbrke opened this issue 5 years ago • 6 comments

ezgif com-video-to-gif (1)

renderAccordionView = () => { return ( <View style={styles.container}> <View style={{ flex: 1 }}> <ScrollView keyboardShouldPersistTaps="always" style={{height:'100%'}}> <FlatList data={this.state.dataSet} extraData={this.state} keyExtractor={(item, index) => String(index)} renderItem={this.renderDetay} /> </ScrollView> </View> <View style={styles.footerContainer}> <Footer onPressGorunum={this.handleOnPressGorunum} onPressSirala={this.handleOnPressSirala} /> </View> </View> ); };

seckinbrke avatar Mar 15 '19 08:03 seckinbrke

Can you create an example on https://snack.expo.io that reproduces this?

iRoachie avatar Apr 21 '19 15:04 iRoachie

Any Solution ?

kishanbharda avatar Aug 19 '19 12:08 kishanbharda

Same problem here:

                  <Collapsible collapsed={aisle.collapsed}>
                    <FlatList
                      extraData={this.state}
                      data={aisle.ingredients}
                      keyExtractor={item => item.name}
                      renderItem={({ item: ingredient, index: ingredientIndex }) =>
                        <TouchableOpacity
                          onPress={() => this.toggleIngredient(aisleIndex, ingredientIndex)}
                        >
                          <View>
                            <View>
                              <Text style={[ingredient.done ? styles.ingredientDone : styles.ingredient]}>
                                {ingredient.value}{ingredient.ingredient.default_unit.symbol} {ingredient.ingredient.name}
                              </Text>
                            </View>
                          </View>
                        </TouchableOpacity>
                      }
                    />
                  </Collapsible>

When i touch an item in the Flatlist it toggle the attribute done and change the style but after touching an element, the element disappear since i add the Collapsible

FrancoisDeBellescize avatar Oct 28 '19 09:10 FrancoisDeBellescize

any solution? same is happening with me

syedamirali14 avatar Mar 16 '20 11:03 syedamirali14

i have fixed this issue use map loop instead of flatlist it will work fine

syedamirali14 avatar Mar 17 '20 12:03 syedamirali14

use alignItems: 'flex-end' property on contentContainerStyle. It worked out for me

RazaShehryar avatar Dec 26 '20 02:12 RazaShehryar