react-truncate
react-truncate copied to clipboard
Support for text without spaces
This should enable multiline truncating of non-typical text that does not contain spaces (eg URLs) and hopefully also resolve #82.
New property breakAll added (default: false).
When set to true, truncated text will behave as if css rule word-break: break-all was applied to the parent block.
Result looks like this:

Not sure how maintained this library is anymore but this fix would be really awesome!
In case it helps anyone, react-text-truncate supports this feature out of the box.
@mirovelk @chason yes, we still maintain the library, but trying to be very careful on what gets in since it will determine our resource allocation in future.
I would say that if setting word-break: break-all in your css does the job, go for it.