fawaz-ahmed / react-native-read-more

React native library to show text in a condensed way and expand when needed. Drop in replacement for Text component and highly customizable. Can be used with expo or native cli for react native.
https://www.npmjs.com/package/@fawazahmed/react-native-read-more
MIT License
274 stars 37 forks source link

Not working on react-native version 0.65.1 #41

Closed mantegnous closed 2 years ago

mantegnous commented 2 years ago

the button read more/read less is not present

fawaz-ahmed commented 2 years ago

the button read more/read less is not present

Hi @mantegnous can you please mention the react native version ? Also please share the code snippet and screenshot ? Just to be sure everything is okay in the code. Thanks for pointing this out.

mantegnous commented 2 years ago

the button read more/read less is not present

Hi @mantegnous can you please mention the react native version ? Also please share the code snippet and screenshot ? Just to be sure everything is okay in the code. Thanks for pointing this out.

"react-native": "^0.65.1",

I have update for use my app ith ios 15 and android 12, but, after this, the buttone is missed and the text is cutted

<ReadMore numberOfLines={3} style={styles.regular} seeMoreText={'Read more'} seeLessStyle={styles.readMore} seeMoreStyle={styles.readMore} seeLessText={'Read less'}> {children} </ReadMore>

children is a string that render my text as always
mantegnous commented 2 years ago

The issue is: line state is always 0 , cannot read the length of the text, something must have changed in native events

mantegnous commented 2 years ago

@fawaz-ahmed any news?

fawaz-ahmed commented 2 years ago

@fawaz-ahmed any news?

@mantegnous I'm checking now. Will update in an hour or so.

fawaz-ahmed commented 2 years ago

@mantegnous I was able to reproduce the issue and also identify the cause. The fix will be rolled out in next hour

mantegnous commented 2 years ago

@fawaz-ahmed i have updated at last version, but the bug persist, i dont see the buttons to see more or see less, my text is cutted. version react nativie: 0.65.1

fawaz-ahmed commented 2 years ago

@mantegnous I tested with rn version 0.66.1. Few things to check: 1 Version for this package should be 2.2.0. Make sure to check in package-lock.json file or yarn.lock file. If not remove package and re-install 2 Run the example in this project (see README.md), tell me if this works fine or not ? 3_ Share a screenshot of what you are seeing ? it might be some other issue related to styling!

mantegnous commented 2 years ago

@fawaz-ahmed i tried with your example, and without any styles, but i see the text cutted, no label to collpse or extend, i'm in 2.2.0, with react native 0.65.1,

mantegnous commented 2 years ago

@fawaz-ahmed in 0.66.1 work correctly, so.. the problem is below 0.66.1

fawaz-ahmed commented 2 years ago

@mantegnous in that case I would recommend you to upgrade your rn version to 0.66.1.

Also I'm attaching screenshots of my example for reference

iOS collapsed Simulator Screen Shot - iPhone 12 - 2021-10-19 at 18 07 12

iOS expanded Simulator Screen Shot - iPhone 12 - 2021-10-19 at 18 07 17

android collapsed Screenshot_1634648983

android expanded Screenshot_1634648989

mantegnous commented 2 years ago

@fawaz-ahmed ok i have updated my app, thanks for fix in 0.66.1 !