React-native-swipe-list-view: SwipeRow height

Created on 26 Nov 2019  路  6Comments  路  Source: jemise111/react-native-swipe-list-view

05418A4F-7390-4550-B720-989FF8930AB8
BFEE7EA7-9C19-4E76-92AB-570E29BC9CAF
77277BAD-3C30-41A8-8596-E7DD5ED868E0

When I updated the 2 component because the height was dynamic, after I refreshed the view, the 1 component was not at the same height as it was the first time

Environment (please complete the following information):

  • OS: [e.g. iOS or Android] 锛歩os
  • RNSLV Version: [e.g. v2.0.2]:2.0.6
  • RN Version: [e.g. v60.0.5]:0.61.2
    FE96D2B1-DD74-4D2D-A407-52FF44795EF7
    ADE1F5DC-ED00-4349-A0F6-93FFFC845E45

Most helpful comment

Hey @baicuhaha @jonnynfb try adding recalculateHiddenLayout={true} as a prop to your SwipeRow. Let me know if that works, thanks!

All 6 comments

I have the same issue. Have you found the solution?

Hey @baicuhaha @jonnynfb try adding recalculateHiddenLayout={true} as a prop to your SwipeRow. Let me know if that works, thanks!

@jemise111 I've solved my problem. Thank you

@jonnynfb Using this recalculateHiddenLayout can be solved

@jemise111 @baicuhaha Thank guys! That fixed it for me.

I have tried to set rowFront.height to 90 after settings recalculateHiddenLayout on SwipeListView, this is my code:

        renderItem={data => (
          <Animated.View
            style={{
              height: this.rowTranslateAnimatedValues[data.item.key].interpolate({
                inputRange: [0, 1],
                outputRange: [0, 50],
              }),
            }}
          >
            <TouchableRipple
              onPress={() => console.log('You touched me')}
              style={styles.rowFront}
              underlayColor={'#AAA'}
            >
              <View>
                <Text>
                  {data.item.description}
                </Text>
              </View>
            </TouchableRipple>
          </Animated.View>
        )}

and my view looks like this:

image

How do you set the height to be dynamic?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kyangy picture kyangy  路  3Comments

VitaliiK91 picture VitaliiK91  路  3Comments

nzrin picture nzrin  路  5Comments

m-ruhl picture m-ruhl  路  6Comments

ramisalem picture ramisalem  路  5Comments