Skip to content

Commit e03c07f

Browse files
authored
fix: fixed backgroundColor of textinput label #3020 (#3038)
1 parent cca9732 commit e03c07f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/TextInput/TextInputFlat.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class TextInputFlat extends React.Component<ChildTextInputProps> {
331331
},
332332
]}
333333
>
334-
{!isAndroid && multiline && (
334+
{!isAndroid && multiline && label && (
335335
// Workaround for: https://github.com/callstack/react-native-paper/issues/2799
336336
// Patch for a multiline TextInput with fixed height, which allow to avoid covering input label with its value.
337337
<View
@@ -341,7 +341,8 @@ class TextInputFlat extends React.Component<ChildTextInputProps> {
341341
StyleSheet.absoluteFill,
342342
dense ? styles.densePatchContainer : styles.patchContainer,
343343
{
344-
backgroundColor: containerStyle.backgroundColor,
344+
backgroundColor:
345+
viewStyle.backgroundColor || containerStyle.backgroundColor,
345346
left: paddingLeft,
346347
right: paddingRight,
347348
},

0 commit comments

Comments
 (0)