Skip to content

lineHeight style has no effect on multiline TextInput #25543

@njdancer

Description

@njdancer

This appears to be the same issue reported in #14232.

When lineHeight is added to multiline TextInput's the height of the TextInput is initially effected however this disappears on first input at which point this appears to be ignored.

import * as React from 'react';
import { View, TextInput } from 'react-native';

export default class App extends React.Component {
  render() {
    return (
      <View>
        <TextInput
          multiline
          style={{
            margin: 30,
            lineHeight: 100,
            borderColor: 'black',
            borderWidth: 1,
          }}
        />
      </View>
    );
  }
}

image

image

React Native version:
expo SDK 33.0 => RN 0.59.8

Steps To Reproduce

1.Render TextInput with multiline=true and style={ lineHeight: <Number> }

Describe what you expected to happen:
lineHeight should be applied to TextInput contents effectively allowing space to be applied between lines of text.

Snack, code example, or link to a repository:
https://snack.expo.io/@njdancer/b91e88

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugComponent: TextInputRelated to the TextInput component.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions