File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -473,10 +473,13 @@ export default class TextField extends BaseInput {
473
473
color,
474
474
...others
475
475
} = this . getThemeProps ( ) ;
476
+
476
477
const typography = this . getTypography ( ) ;
477
478
const { lineHeight, ...typographyStyle } = typography ;
478
479
const textColor = this . getStateColor ( color || this . extractColorValue ( ) ) ;
479
480
const hasRightElement = this . shouldDisplayRightButton ( ) || rightIconSource ;
481
+ const shouldUseMultiline = multiline || expandable ;
482
+
480
483
const inputStyle = [
481
484
hasRightElement && this . styles . rightElement ,
482
485
this . styles . input ,
@@ -485,12 +488,13 @@ export default class TextField extends BaseInput {
485
488
Constants . isAndroid && { lineHeight} ,
486
489
expandable && { maxHeight : lineHeight * ( Constants . isAndroid ? 3 : 3.3 ) } ,
487
490
Constants . isRTL && { minHeight : lineHeight + 3 } ,
491
+ Constants . isIOS && shouldUseMultiline && { paddingTop : 0 } , // fix for iOS topPadding in multiline TextInput
488
492
{ color : textColor } ,
489
493
style
490
494
] ;
495
+
491
496
const placeholderText = this . getPlaceholderText ( ) ;
492
497
const placeholderColor = this . getStateColor ( placeholderTextColor || DEFAULT_COLOR_BY_STATE . default ) ;
493
- const shouldUseMultiline = multiline ? multiline : expandable ;
494
498
const isEditable = ! this . isDisabled ( ) && ! expandable ;
495
499
496
500
return (
You can’t perform that action at this time.
0 commit comments