dancormier / react-native-swipeout

iOS-style swipeout buttons behind component
MIT License
2.62k stars 646 forks source link

NativeButton Warnings #285

Closed martakielpinska closed 6 years ago

martakielpinska commented 6 years ago

Hello, I've been working with swipeout for a while now and I never had problems that occur now. My react native version is 0.55.4

I'm getting two warnings: 1 2

Here is the swipeout options that are being passed:

const swipeoutOptions = {
        backgroundColor: "white",
        autoClose: true,
        rowId: this.props.key,
        sectionId: 1,
        onClose: (secId, rowId, direction) => {
            this.setState({
                activeRowKey: null,
            })
        },
        onOpen: (secId, rowId, direction) => {
            this.setState({
                activeRowKey: this.props.key,
            })
        },
        right: 
        [
            {
                onPress : ()=>{},
                text: "Delete",
                underlayColor: 'rgba(0, 0, 0, 1, 0.6)',
                backgroundColor: "#e2371d",
            }
        ],

    }

I'm very sorry if it's only my problem and not an actual reason for opening an issue, but I have never run into those problems before. The swipeout works but I wish to know how to properly get rid of those warnings. Thank you in advance for any information you can give me

astraeapark commented 6 years ago

oh i have same problem even i don't use textStyle and background!

const deleteButton = [ { text: 'Delete', onPress : ()=>{console.log("deleteBtn")}, }, ]; and also get Warning: NativeButton: prop type background is invalid; it must be a function, usually from React.PropTypes.

zyh41 commented 6 years ago

+1

daniel031699 commented 6 years ago

I also have this problem,if any way to solve this problem??? --I just started learning English

martakielpinska commented 6 years ago

This issue got closed but will there be any fix?

techrah commented 6 years ago

I no longer have this issue (for the background property) after installing version 2.3.6.