Skip to content

Commit 0d7ac21

Browse files
karlingenAndarist
andauthored
Account for word-break property when calculating the height (#326)
* Fix #325 Height calculation is not accurate when using word-break * Include `'word-break'` in sizing style * Use correct casing * Add changeset * Update .changeset/quick-pianos-exercise.md Co-authored-by: Mateusz Burzyński <[email protected]>
1 parent 58c9807 commit 0d7ac21

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-textarea-autosize': patch
3+
---
4+
5+
Account for `word-break` property when calculating the height.

src/getSizingData.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const SIZING_STYLE = [
2323
'textRendering',
2424
'textTransform',
2525
'width',
26+
'wordBreak',
2627
] as const;
2728

2829
type SizingProps = Extract<

0 commit comments

Comments
 (0)