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

Goes to next line in the middle of the word #128

Closed
Nickk4 opened this issue Nov 20, 2023 · 2 comments
Closed

Goes to next line in the middle of the word #128

Nickk4 opened this issue Nov 20, 2023 · 2 comments

Comments

@Nickk4
Copy link

Nickk4 commented Nov 20, 2023

It cuts off in the middle of the word to go to the next line. For example, the code below renders as:

This is a very long text, just fo
r testing purposes and nothi...

<LinesEllipsis
  text="This is a very long text, just for testing purposes and nothing else"
  maxLine="2"
  ellipsis="..."
  trimRight={true}
  basedOn="letters"
/>

My problem is that in the middle of the word for it breaks to a next line. I've also tried basedOn="words" and trimRight={false} but it would still cut of after the o in the word for.

@xiaody
Copy link
Owner

xiaody commented Nov 21, 2023

The breaking of for has nothing to do with this component. Check your css word-break settings.

@xiaody xiaody closed this as completed Nov 21, 2023
@Nickk4
Copy link
Author

Nickk4 commented Nov 21, 2023

Thanks @xiaody ! It was indeed just a matter of setting a word-break in css.

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

No branches or pull requests

2 participants