From 2fb107c9a63aacd2c880ad6abedaad67ffb6022b Mon Sep 17 00:00:00 2001 From: Hetan Thakkar Date: Tue, 17 May 2022 03:26:34 -0700 Subject: [PATCH] Fixed Textinput not properly handling padding and paddingVertical in style props (#33564) Summary: Fixes https://github.com/facebook/react-native/issues/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 [iOS] [Fixed] - Fixed paddingTop not being applied when using padding and paddingVertical in multiline textinput Pull Request resolved: https://github.com/facebook/react-native/pull/33564 Reviewed By: christophpurrer, cortinico Differential Revision: D36018667 Pulled By: kacieb fbshipit-source-id: 0af0ed8ea536ec4e813325b1cf93c7cb2481eb07 --- Libraries/Components/TextInput/TextInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 6050fa4cc9f..273d64914dd 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -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 =