@@ -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 } ,
@@ -355,8 +350,8 @@ function BaseTextInput(
355
350
placeholderTextColor = { placeholderTextColor ?? theme . placeholderText }
356
351
underlineColorAndroid = "transparent"
357
352
style = { [
358
- ! autoGrow && styles . flex1 ,
359
- ! autoGrow && styles . w100 ,
353
+ styles . flex1 ,
354
+ styles . w100 ,
360
355
inputStyle ,
361
356
( ! hasLabel || isMultiline ) && styles . pv0 ,
362
357
inputPaddingLeft ,
0 commit comments