You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens if the truncate-component if wrapped by a flex element,
and that flex element only takes minimal required space to fix its
content.
The issue here is that `measureText` methods uses rounding, while
width of the truncate component's ref is calculated without rounding.
Removing rounding and applying good-enough floats comparison
fixes the issue.
* Issue #69 | Don't truncate if text fits into an element
This happens if the truncate-component if wrapped by a flex element,
and that flex element only takes minimal required space to fix its
content.
The issue here is that `measureText` methods uses rounding, while
width of the truncate component's ref is calculated without rounding.
Removing rounding and applying good-enough floats comparison
fixes the issue.
* Add css for the example
Co-authored-by: Pavel Savchuk <[email protected]>
<TextTruncate line={2} truncateText='...' text={'V3'}></TextTruncate>
simply displays '...'.
If I add another character to make it 'V33', for instance, it displays text. The div container this is in is 320px, so plenty of room there.
The text was updated successfully, but these errors were encountered: