Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed wrong hight measurenment for short strings #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

san-smith
Copy link

On ios hight measurenment sometimes is work wrong.
For example, if i write "Enjoyable salon experience", fullHeight and limitedHeight will be have this value:
fullHeight: 17.6666259765625 limitedHeight: 17.3333740234375

In this case, I have "read more" button, but it should not be.

Using Math.ceil in measureHeightAsync function solves this problem.

Screenshot 2019-05-08 at 16 12 50

@ravalikarumuri
Copy link

Hello Simth,

Will this problem solve, the display of read more even the text is 1 line?

@san-smith
Copy link
Author

Hello Ravali.
In my case it solved the problem - for short strings (in particular for 1 string) "read more" don't display.
You may try use this fork until a solution appears.
Just add "react-native-read-more-text": "git+https://github.com/digital-design-nyc/react-native-read-more-text.git" in your package.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants