@@ -50,6 +50,7 @@ function BaseTextInput(
50
50
autoFocus = false ,
51
51
disableKeyboard = false ,
52
52
autoGrow = false ,
53
+ autoGrowExtraSpace = 0 ,
53
54
autoGrowHeight = false ,
54
55
maxAutoGrowHeight,
55
56
hideFocusedState = false ,
@@ -253,7 +254,8 @@ function BaseTextInput(
253
254
const newTextInputContainerStyles : StyleProp < ViewStyle > = StyleSheet . flatten ( [
254
255
styles . textInputContainer ,
255
256
textInputContainerStyles ,
256
- ( autoGrow || ! ! contentWidth ) && StyleUtils . getWidthStyle ( textInputWidth ) ,
257
+ ! ! contentWidth && StyleUtils . getWidthStyle ( textInputWidth ) ,
258
+ autoGrow && StyleUtils . getAutoGrowWidthInputContainerStyles ( textInputWidth , autoGrowExtraSpace ) ,
257
259
! hideFocusedState && isFocused && styles . borderColorFocus ,
258
260
( ! ! hasError || ! ! errorText ) && styles . borderColorDanger ,
259
261
autoGrowHeight && { scrollPaddingTop : typeof maxAutoGrowHeight === 'number' ? 2 * maxAutoGrowHeight : undefined } ,
@@ -444,14 +446,10 @@ function BaseTextInput(
444
446
) }
445
447
{ /*
446
448
Text input component doesn't support auto grow by default.
447
- We're using a hidden text input to achieve that.
448
449
This text view is used to calculate width or height of the input value given textStyle in this component.
449
450
This Text component is intentionally positioned out of the screen.
450
451
*/ }
451
452
{ ( ! ! autoGrow || autoGrowHeight ) && ! isAutoGrowHeightMarkdown && (
452
- // Add +2 to width on Safari browsers so that text is not cut off due to the cursor or when changing the value
453
- // https://github.com/Expensify/App/issues/8158
454
- // https://github.com/Expensify/App/issues/26628
455
453
< Text
456
454
style = { [
457
455
inputStyle ,
0 commit comments