react-input-autosize icon indicating copy to clipboard operation
react-input-autosize copied to clipboard

Width is not calculated correctly on font-size change

Open Nases opened this issue 4 years ago • 2 comments

Anything more than font-size: 14 makes the width come short. Example input style:

inputStyle={{
   fontSize: 20,
}}

Nases avatar Dec 15 '20 17:12 Nases

So apparently size is calculated using the sizer's ref div. But inputStyle does not change sizer's font-size.

Nases avatar Dec 15 '20 17:12 Nases

Since inputStyle does not change sizer's font size we either need to change className or style of AutosizeInput in order to get correct results.

Nases avatar Dec 15 '20 20:12 Nases