callstack / callstack/react-native-paper

React Native 0.73 supports `transformOrigin` which can potentially fix TextInput issues

Offen
#4,341 2 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
14.5k
Forks
2.2k
Ø Merge
5 T. 23 Std.
Gemergte PRs (30 T.)
12

Beschreibung

See related source code:
https://github.com/callstack/react-native-paper/blob/813cdd47a90ee3bb693c6ec143af73092cd3edae/src/components/TextInput/Label/InputLabel.tsx#L62

See React Native 0.73 docs mentioning `transformOrigin` https://reactnative.dev/docs/0.73/transforms#transform-origin

It means we do not need to move TextInput label with [translateX](https://github.com/callstack/react-native-paper/blob/813cdd47a90ee3bb693c6ec143af73092cd3edae/src/components/TextInput/Label/InputLabel.tsx#L63) to adjust label position after [scaling](https://github.com/callstack/react-native-paper/blob/813cdd47a90ee3bb693c6ec143af73092cd3edae/src/components/TextInput/Label/InputLabel.tsx#L102). Most likely `translateX` was needed b/c transform origin was always related to `center` before v0.73. Now we can set it `left` and remove `translateX` position adjustments.

Related issues:
https://github.com/callstack/react-native-paper/issues/4245
https://github.com/callstack/react-native-paper/issues/4299
https://github.com/callstack/react-native-paper/issues/4340
and possibly more related issues reporting TextInput label flickering..

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.