How to place multiple line text input inside Alert in react native Something like this..
In React Native, we are more strict about it: you must wrap all the text nodes inside of a <Text> component. You cannot have a text node directly under a <View> . You also lose the ability to set up a default font for an entire subtree.
To solve the issue of being unable to type in an input field in React, make sure to use the defaultValue prop instead of value for uncontrolled input fields. Alternatively, set an onChange prop on the field and handle the change event.
A custom component with Modal may help you achieve this.
There is no way you could add a multiple line text input to the Alert component. According to the documentation (https://facebook.github.io/react-native/releases/0.29/docs/alert.html), it accepts a title, message, buttons and type only. You will need to create a custom component by yourself in order to achieve that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With