@@ -25,7 +25,6 @@ import useMarkdownStyle from '@hooks/useMarkdownStyle';
25
25
import useStyleUtils from '@hooks/useStyleUtils' ;
26
26
import useTheme from '@hooks/useTheme' ;
27
27
import useThemeStyles from '@hooks/useThemeStyles' ;
28
- import getPlatform from '@libs/getPlatform' ;
29
28
import isInputAutoFilled from '@libs/isInputAutoFilled' ;
30
29
import variables from '@styles/variables' ;
31
30
import CONST from '@src/CONST' ;
@@ -80,10 +79,6 @@ function BaseTextInput(
80
79
} : BaseTextInputProps ,
81
80
ref : ForwardedRef < BaseTextInputRef > ,
82
81
) {
83
- // For iOS, we don't need to measure the text input because it already has auto grow behavior
84
- // See TextInputMeasurement.ios.tsx for more details
85
- const isExternalAutoGrowMeasurement = getPlatform ( ) !== CONST . PLATFORM . IOS && autoGrow ;
86
-
87
82
const InputComponent = InputComponentMap . get ( type ) ?? RNTextInput ;
88
83
const isMarkdownEnabled = type === 'markdown' ;
89
84
const isAutoGrowHeightMarkdown = isMarkdownEnabled && autoGrowHeight ;
@@ -253,7 +248,7 @@ function BaseTextInput(
253
248
styles . textInputContainer ,
254
249
textInputContainerStyles ,
255
250
! ! contentWidth && StyleUtils . getWidthStyle ( textInputWidth ) ,
256
- isExternalAutoGrowMeasurement && StyleUtils . getAutoGrowWidthInputContainerStyles ( textInputWidth , autoGrowExtraSpace ) ,
251
+ autoGrow && StyleUtils . getAutoGrowWidthInputContainerStyles ( textInputWidth , autoGrowExtraSpace ) ,
257
252
! hideFocusedState && isFocused && styles . borderColorFocus ,
258
253
( ! ! hasError || ! ! errorText ) && styles . borderColorDanger ,
259
254
autoGrowHeight && { scrollPaddingTop : typeof maxAutoGrowHeight === 'number' ? 2 * maxAutoGrowHeight : undefined } ,
@@ -352,8 +347,8 @@ function BaseTextInput(
352
347
placeholderTextColor = { placeholderTextColor ?? theme . placeholderText }
353
348
underlineColorAndroid = "transparent"
354
349
style = { [
355
- ! autoGrow && styles . flex1 ,
356
- ! autoGrow && styles . w100 ,
350
+ styles . flex1 ,
351
+ styles . w100 ,
357
352
inputStyle ,
358
353
( ! hasLabel || isMultiline ) && styles . pv0 ,
359
354
inputPaddingLeft ,
0 commit comments