Issue:
I am facing a problem with my text input. The placeholder can hold a maximum of 2000 characters, but when the user starts typing, the height of the text input does not automatically shrink back down.
It seems like the height of the multiline text input is determined by the original length of the placeholder text. Is there a way to work around this?
Code Snippet:
import { Input } from 'react-native-elements';
interface Props {
placeHolder: string;
onChangeText: (text: string) => void;
}
const MyTextInput = (inputs: Props) => (
<View>
<Input
inputStyle={{ textAlignVertical: 'top' }}
placeholder={inputs.placeHolder}
onChangeText={(text) => inputs.onChangeText(text)}
multiline={true}
maxLength={2000}
/>
</View>
);
export default MyTextInput;
Screenshots:
Initial long placeholder: https://i.sstatic.net/sLUxF.jpg
User begins entering text: https://i.sstatic.net/mFqJd.jpg
Text Input height remains unchanged: https://i.sstatic.net/PFEbp.jpg