Giter VIP home page Giter VIP logo

Comments (13)

hichemfantar avatar hichemfantar commented on July 20, 2024 1

On IOS you have create a new toast element inside each modal, refs are auto handled
https://github.com/calintamas/react-native-toast-message/blob/main/docs/modal-usage.md#notes-regarding-react-native-modal-or-nativestacknavigator

from react-native-toast-message.

hackerhgl avatar hackerhgl commented on July 20, 2024

@Kief5555 Were you able to figure out a solution?

from react-native-toast-message.

Kief5555 avatar Kief5555 commented on July 20, 2024

@Kief5555 Were you able to figure out a solution?

No, I might try to import the toast in the modal and try to display it there.

from react-native-toast-message.

devoren avatar devoren commented on July 20, 2024

same issue

from react-native-toast-message.

jmcartlamy avatar jmcartlamy commented on July 20, 2024

Are you tried this ? Notes regarding react-native-modal or NativeStackNavigator

from react-native-toast-message.

devoren avatar devoren commented on July 20, 2024

@jmcartlamy Hey! I'm using an Expo router so if I use it this way I get a warning. Also i saw this comment #195 (comment) so i will try containedModal

from react-native-toast-message.

QuixThe2nd avatar QuixThe2nd commented on July 20, 2024

Im getting the same issue too.

from react-native-toast-message.

alanschwarz avatar alanschwarz commented on July 20, 2024

Any news on this? Using 'containedModal' as suggested in #195 is not a sustainable solution.
The user looses the ability to swipe down the modal on iOS, therefore compromising intuitive behaviour of the app.

from react-native-toast-message.

Kief5555 avatar Kief5555 commented on July 20, 2024

On IOS you have create a new toast element inside each modal, refs are auto handled

https://github.com/calintamas/react-native-toast-message/blob/main/docs/modal-usage.md#notes-regarding-react-native-modal-or-nativestacknavigator

This is a different type of modal, I think. Shown in the screenshot is the native Modal Component (not view)

from react-native-toast-message.

hichemfantar avatar hichemfantar commented on July 20, 2024

On IOS you have create a new toast element inside each modal, refs are auto handled
https://github.com/calintamas/react-native-toast-message/blob/main/docs/modal-usage.md#notes-regarding-react-native-modal-or-nativestacknavigator

This is a different type of modal, I think. Shown in the screenshot is the native Modal Component (not view)

It's the same for both stack modals and the RN Modal component.

from react-native-toast-message.

moritzlang avatar moritzlang commented on July 20, 2024

Rendering content on top of native views (presentation="modal") is a bit tricky. What works for me is rendering the Toast component again in the Screen using @gorhom/portal as following:

<Portal hostName="toast">
  <FullWindowOverlay>
    <Toast />
  </FullWindowOverlay>
</Portal>

Be aware that this solution does not work when running the app on the simulator. It somehow only works on the final build.
See React Native Screens Integration docs for more details.

from react-native-toast-message.

calummoore avatar calummoore commented on July 20, 2024

For me, it worked when I added the Toast to the modal view, but the Toast has to be the last component.

export function ModalView({ children }: ModalViewProps) {
  return (
    <>
      {children}
      <Toast />
    </>
  )
}

from react-native-toast-message.

alexandrius avatar alexandrius commented on July 20, 2024

Use FullWindowOverlay from react-native-screens

from react-native-toast-message.

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.