React-native-paper: TextField label has margin initialValues

Created on 27 Sep 2019  路  6Comments  路  Source: callstack/react-native-paper

Environment

react-nativo > 0.61.1
react-native-paper 3.0.0-alpha.5

Description

In input text fields, when fields are filled in by redux or the label has a different margin than the text. after you change the value back to normal

Reproducible Demo

image

Most helpful comment

Will try to fix this, this week probably Tuesday.

All 6 comments

PLEASE FIX THIS :((((((

@mishojan please send a pull request

Will try to fix this, this week probably Tuesday.

Ok little bit later than Tuesday but I found the cause :-)

The code here is never ran when you have an initial value

https://github.com/callstack/react-native-paper/blob/master/src/components/TextInput/TextInput.tsx#L210

There is an initial value available in the state so it's never changed there
https://github.com/callstack/react-native-paper/blob/master/src/components/TextInput/TextInput.tsx#L191

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timothystewart6 picture timothystewart6  路  4Comments

ferrannp picture ferrannp  路  4Comments

satya164 picture satya164  路  4Comments

talaikis picture talaikis  路  3Comments

zxccvvv picture zxccvvv  路  4Comments