Skip to content

Commit

Permalink
Fixed Textinput not properly handling padding and paddingVertical in …
Browse files Browse the repository at this point in the history
…style props (#33564)

Summary:
Fixes #33562 #21720. Earlier this [`paddingTop`](https://github.com/facebook/react-native/blob/d5da70e17e8c8210cd79a4d7b09c6a5ded4b5607/Libraries/Components/TextInput/TextInput.js#L1367) used to override the  `paddingTop` of `padding` and `paddingVertical` of the style props. Using `Stylesheet.flatten` will solve this problem.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - Fixed paddingTop not being applied when using padding and paddingVertical in multiline textinput

Pull Request resolved: #33564

Reviewed By: christophpurrer, cortinico

Differential Revision: D36018667

Pulled By: kacieb

fbshipit-source-id: 0af0ed8ea536ec4e813325b1cf93c7cb2481eb07
  • Loading branch information
hetanthakkar authored and facebook-github-bot committed May 17, 2022
1 parent d51534a commit 2fb107c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ function InternalTextInput(props: Props): React.Node {

const style =
props.multiline === true
? [styles.multilineInput, props.style]
? StyleSheet.flatten([styles.multilineInput, props.style])
: props.style;

const useOnChangeSync =
Expand Down

0 comments on commit 2fb107c

Please sign in to comment.