forked from ShinyChang/React-Text-Truncate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue ShinyChang#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.
- Loading branch information
Pavel Savchuk
committed
Feb 21, 2022
1 parent
250b498
commit 8527eb2
Showing
3 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters