question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] textAlignVertical doesn't work on nested text

See original GitHub issue

textAlignVertical works fine when set on the top-most Text component. However, if you have any nested texts (a common use case), you can not override the alignVertical in the child Text component.

Environment

OS: macOS Sierra 10.12.6 Node: 9.3.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 2.3.3

Packages: (wanted => installed) react: 16.3.0-alpha.1 => 16.3.0-alpha.1 react-native: 0.55.0 => 0.55.0

Steps to Reproduce

  1. Use this expo app OR create a nested Text component with the same height as its parent & give it a textAlignVertical

Expected Behavior

The child Text’s textAlignVertical should be honored.

Actual Behavior

The child Text’s textAlignVertical is NOT honored. See screenshots below for two different cases:

textAlignVertical on parent Text textAlignVertical on child Text
screen shot 2018-04-10 at 12 45 05 pm screen shot 2018-04-10 at 12 44 47 pm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
stale[bot]commented, Nov 3, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community’s attention? This issue may be closed if no further activity occurs. You may also label this issue as “For Discussion” or “Good first issue” and I will leave it open. Thank you for your contributions.

0reactions
stale[bot]commented, Nov 6, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] textAlignVertical doesn't work on nested text #30375
textAlignVertical works fine when set on the top-most Text component. However, if you have any nested texts (a common use case), you can...
Read more >
Nested Text, Vertical Align not working - React Native
I want the nested Text vertically center aligned with the parent one. Code // @flow import React, { Component } from 'react'; ...
Read more >
Text · React Native
A React component for displaying text. Text supports nesting, styling, and touch handling. In the following example, the nested title and body text...
Read more >
Text - React Native Archive
A React component for displaying text. Text supports nesting, styling, and touch handling. In the following example, the nested title and body text...
Read more >
Aligning Children using Flexbox in React Native - Modus Create
First we need to create the required views and texts, open the ... Because we didn't define a flex direction, the column direction...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found