Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

It will not be restored after sliding. #268

Closed
liuqing520it opened this issue May 18, 2018 · 10 comments
Closed

It will not be restored after sliding. #268

liuqing520it opened this issue May 18, 2018 · 10 comments

Comments

@liuqing520it
Copy link

liuqing520it commented May 18, 2018

image
image
image

Swipeout drag will affect the layout of the control on the swipeout, causing the subspaces on the swipeout to shift to the left.

"react": "16.3.1",
"react-native": "0.55.4",
"react-navigation": "^1.1.2",
"react-navigation-redux-helpers": "^1.0.6",
"react-redux": "^5.0.7",
"redux": "^4.0.0"

@lytieunuong1
Copy link

lytieunuong1 commented May 21, 2018

I got the same issue when I tried to use this lib. Here is my code:

render() {
        const swipeSetting = {
            autoClose: true,
            onClose: (secId, rowId, direction) => {
            },
            onOpen: (secId, rowId, direction) => {
            },
            right: [
                {
                    onPress: () => {
                        
                    },
                    text: 'Delete',type: 'delete'
                }
            ],
            rowId: this.props.item.index,
            sectionId:1
        };
        return (
            <Swipeout {...swipeSetting}>
                <View style={{}}>
                    <View style={{
                        flex: 1, 
                        backgroundColor: 'mediumseagreen',
                        flexDirection: 'row'
                        }}>
                        <Image style={{width:100, height:100, margin: 5}} source={{uri:this.props.item.imageURL}} />
                        <View style={{flex: 1, flexDirection:'column'}}>
                            <Text style={styles.flatListItem}>{this.props.item.name}</Text>
                            <Text style={styles.flatListItem}>{this.props.item.foodDescription}</Text>
                        </View>
                        
                    </View>
                    <View style={{
                        height: 1,
                        backgroundColor: '#dadada'
                    }}
                    ></View>
                </View>
            </Swipeout> 
        );
    }

And style is:

const styles = StyleSheet.create({
    flatListItem: {
        color: 'white',
        padding: 10,
        fontSize: 16
    }
});

Please show me what was wrong... Thanks so much!

@MarioGogogo
Copy link

MarioGogogo commented May 23, 2018

I have the same problem, please tell me the answer
http://o8lhvvxj2.bkt.clouddn.com/540F0DA1-7A3D-47CF-B57F-7DB9A3828208.png

@hamedmam
Copy link

hamedmam commented May 25, 2018

same here, cards wont go back to first position (some margin left on right), and the more you swipe them to left the more margin appears

@kunalqss
Copy link

Possible duplicate of #267

@manoj2166
Copy link

I have the same issue in iPhone

@kenanlalic
Copy link

try instead of

<Swipeout {...swipeSetting}>
                <View style={{}}>
                   ...
                </View>
</Swipeout> 
<Swipeout {...swipeSetting}>
                <TouchableWithoutFeedback style={{}}>
                   ...
                </TouchableWithoutFeedback>
</Swipeout> 

@liuqing520it
Copy link
Author

liuqing520it commented Jun 22, 2018

update react-native v0.56.0-rc or returning to 0.54.4 fixes the problem.

@SCJMENGMENG
Copy link

npm install --save react-native@0.51

@markrookie
Copy link

Release 2.3.6 fixed this issue

@amrit-sahoo
Copy link

It still appears on 2.3.6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants