rcaferati/react-native-really-awesome-button

Hair trigger when overlaying other button

SimonAM opened this issue · 0 comments

Situation: Using a start and pause button, one "covering" the other using inline conditional control
Issue: The pause and start onPress-handlers accidentally fires when the other button is pressed (hair trigger).
Troubleshooting: Using react native Button-element removes the issue.

{!isPaused ?
    <AwesomeButton
                    ripple
                    onPress={() => timerStart()}
                    disabled={!isValid}
                        > Start
     </AwesomeButton>
                    : 
    <AwesomeButton
                            backgroundColor="crimson"
                            backgroundDarker="darkred"
                            ripple
                            onPress={() => dispatch(pauseTimer())}
                                > Paused
       </AwesomeButton>
 }