react-input-autosize
react-input-autosize copied to clipboard
Width is not calculated correctly on font-size change
Anything more than font-size: 14
makes the width come short.
Example input style:
inputStyle={{
fontSize: 20,
}}
So apparently size is calculated using the sizer's ref div.
But inputStyle
does not change sizer's font-size
.
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.