Git Product home page Git Product logo

Comments (6)

dcnc336 avatar dcnc336 commented on June 2, 2024 1

Hi @zahidalidev , I added ToastManager, so It seems I am using concurently the ToastManager for both inside and outside of Modal
Here is code

      <Modal>
         <View
            style={{
              width: '100%',
              height: '100%',
              backgroundColor: 'white',
            }}
        >
          <View>
              <Image source={ModalImg} alt='' style={styles.modalImg} />
          </View>
          <View>
            <View style={styles.searchView}>
              <View style={styles.buttonStyleX}>
                <Text style={styles.modalText}>Device ID</Text>
                <Input
                    variant='outline'
                    placeholder='_x_x_x_x_'
                    onChangeText={(value) => setMachineName(value)}
                    style={{
                        height: 50,
                        fontSize: 20,
                        color: 'black',
                        fontFamily: 'sans-serif',
                    }}
                />
              </View>
              <View style={styles.buttonStyleX}>
                <Text style={styles.modalText}>Nickname</Text>
                <Input
                    variant='outline'
                    placeholder='bleach, soap, water, etc...'
                    onChangeText={(value) => setNickName(value)}
                    style={{
                        height: 50,
                        fontSize: 20,
                        color: 'black',
                        fontFamily: 'sans-serif',
                    }}
                />
              </View>
            </View>
          </View>
          <View style={styles.CaptionText}>
            <View
              style={{
                  marginTop: 20,
                  marginLeft: 20,
                  marginRight: 20,
                  display: 'flex',
                  flexDirection: 'row',
                  justifyContent: 'center',
                  gap: 40,
              }}
            >
              <Pressable onPress={addValve}>
                  <Text style={styles.buttonStyle}>Add</Text>
              </Pressable>
              <Pressable onPress={formatValues}>
                  <Text style={styles.buttonStyle}>Close</Text>
              </Pressable>
            </View>
          </View>
        </View>
        <ToastManager 
           width={307}
           height={58}
           animationStyle="rightInOut"
           duration={2000}
        />
    </Modal>

And then, I processed follow steps

  • click button to show modal
  • show toastify alert on modal
  • close modal

After do it, toastify alert not showed on backdrop. Can you please try with my process?

from toastify-react-native.

zahidalidev avatar zahidalidev commented on June 2, 2024

@dcnc336 you to have pas ToastManager inside the Modal as well like explained in this issue

from toastify-react-native.

dcnc336 avatar dcnc336 commented on June 2, 2024

Hi @zahidalidev , Thank you for your answer, I checked the issue and tried that, but it not helped for me, I commented my issue on there, Please check and help me

from toastify-react-native.

zahidalidev avatar zahidalidev commented on June 2, 2024

@dcnc336 I can see your are using ToastManager only once as a provider, but to show the toast at the top of the Modal, you have use ToastManager as a child to that Modal as well, for example.
If it still does not work, please provide your modal component's code as well, thanks.

<Modal>
// So you should use the ToastManager in provider and also here inside the Modal as well, use ToastManager like this, because to show the toast over the modal it should be provded as its children as well.
<ToastManager 
        width={307}
        height={58}
        animationStyle="rightInOut"
        duration={2000}
    />
</Modal>

from toastify-react-native.

zahidalidev avatar zahidalidev commented on June 2, 2024

@dcnc336 Thanks, let me try.

from toastify-react-native.

dcnc336 avatar dcnc336 commented on June 2, 2024

Thank you @zahidalidev ! I will very look forward your reply

from toastify-react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.