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

Alert dismisses automatically #24

Open
AishwaryaSurana opened this issue May 3, 2018 · 2 comments
Open

Alert dismisses automatically #24

AishwaryaSurana opened this issue May 3, 2018 · 2 comments

Comments

@AishwaryaSurana
Copy link

When I call Alert onPress of particular item. It dismisses automatically

<View style={{flex:1, alignItems:'center', justifyContent:'center'}}>
          <View style={{height: Platform.OS==='ios'? 40:0}} /> 
            <PopoverTooltip
              labelStyle={{color:'#ffffff'}}
              buttonComponent={
                <View style={{width:200, height:50, justifyContent: 'center', alignItems: 'center', borderRadius: 5}}>
                  <Image
                      source={require('./img/popupmenu.png')}
                      style={styles.tooltipImg} />
                </View>
              }
                
              items={[
                {
                  label:STR.strings.popup,
                  onPress: () => {Actions.edit()}   //Works fine
                },
                {
                  label:STR.strings.popup1,
                  onPress: () => {Actions.delete()} // Works fine
                },
                {
                  label:STR.strings.popup2,
                  onPress: () => {Alert.alert("Hello")} // Here is the issue!!Alert appears and dismisses automatically
                },
              
              ]}
              timingConfig={{duration: 1}}
              opacityChangeDuration={1}
              overlayStyle={{backgroundColor: 'transparent'}} // set the overlay invisible
              labelContainerStyle={{ backgroundColor: '#000000',alignItems: 'stretch'}}
              labelSeparatorColor='#ffffff' 
              tooltipContainerStyle= {{marginLeft:45,marginBottom:120,marginTop:-20, width: '55%'}}/>
          </View>
@tombaki
Copy link

tombaki commented Jul 16, 2018

@AishwaryaSurana use settimeout function

@gys-dev
Copy link

gys-dev commented Mar 13, 2020

Same issue. After debug i realize when click button to show tooltip menu don't set state isModalOpen in several times. So you can try this folk:`

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

3 participants