Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug on Toast with keyboard open #13

Open
fqr1 opened this issue Apr 16, 2018 · 0 comments
Open

Bug on Toast with keyboard open #13

fqr1 opened this issue Apr 16, 2018 · 0 comments

Comments

@fqr1
Copy link

fqr1 commented Apr 16, 2018

I have a Button that triggers the Toast, and a TextInput that triggers the Toast too,
If I press one and wait until is closed, to trigger the second Toast, it works normally (for example, press the button, wait until the Toast is close, and write in the TextInput)

But the problem goes when the second Toast is shown, but the first Toast is not closed yet. The message is shown twice in the device

Usage example:
http://g.recordit.co/0gAmNo30LQ.gif

Image

Code:

import React, {Component} from 'react';
import {
    View, StyleSheet, Text, Button, TextInput
} from 'react-native';

import Toast from 'react-native-toast-native';

class ToastComponent extends Component {

    onChange(){
        Toast.show(
            'onChange toast.',
            Toast.LONG,
            Toast.BOTTOM
        );
    }

    buttonPressed(){
        Toast.show(
            'Button toast.',
            Toast.LONG,
            Toast.BOTTOM
        );
    }

    render() {
        return (
            <View style={styles.main}>
                <Text>react-native-toast-native</Text>
                <Button title="Button" onPress={this.buttonPressed.bind(this)}/>
                <TextInput onChange={this.onChange.bind(this)} style={styles.input}/>
            </View>
        );
    }
}

const styles = new StyleSheet.create({
    main: {},
    input: {
        backgroundColor: 'lightblue'
    }
});

export default ToastComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant