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

onReady callback never called when text have less lines than numberOfLines #68

Closed
matziol opened this issue Jul 1, 2022 · 3 comments · Fixed by #69
Closed

onReady callback never called when text have less lines than numberOfLines #68

matziol opened this issue Jul 1, 2022 · 3 comments · Fixed by #69

Comments

@matziol
Copy link

matziol commented Jul 1, 2022

When passed text is shorter and evaluating to less lines than numberOfLines. This is how it looks with example app and numberOfLines={3}:

<ReadMore
  numberOfLines={3}
  style={styles.textStyle}
  onReady={() => Alert.alert('onReady Called')}>
  {
    "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
  }
</ReadMore>
Simulator.Screen.Recording.-.iPhone.13.-.2022-07-01.at.12.06.00.mp4

AND

<ReadMore
  numberOfLines={3}
  style={styles.textStyle}
  onReady={() => Alert.alert('onReady Called')}>
  {'Lorem Ipsum is simply dummy text'}
</ReadMore>
Simulator.Screen.Recording.-.iPhone.13.-.2022-07-01.at.12.07.34.mp4
@fawaz-ahmed
Copy link
Owner

@matziol thanks for bringing this up. I'll debug this.

@fawaz-ahmed
Copy link
Owner

@matziol fix released in ver 2.3.7

@matziol
Copy link
Author

matziol commented Jul 3, 2022

Working well, thank you!

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