rishabhbhatia / react-native-awesome-alerts

Awesome alerts for React Native, works with iOS and Android.
MIT License
525 stars 71 forks source link

Add ScrollView to modal content #75

Closed AllanKlaus closed 4 years ago

AllanKlaus commented 4 years ago

Motivation

When we have a large message we can not see all message.

Solution

Add the content of modal as a child of ScrollView it will enable to scroll the message modal.

Changelog

[x] Fix large messages to show correctly on modal

Before

before

After

after

rishabhbhatia commented 4 years ago

@AllanKlaus Hey Allan, you can achieve it by passing your own JSX to customView prop. Appreciate the PR, going to close it for now.

predescu commented 3 years ago

for who is looking for a solution, this worked for me:

<AwesomeAlert
  customView={<ScrollView bounce={false}>....</ScrollView>}
  contentContainerStyle={{ maxHeight: '80%' }}
/>
AllanKlaus commented 3 years ago

It works, but when I did it It needed a lot of things in this customView. I cloned the project and create a lib on my project to make this change that was not approved.