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

Cannot use my own textarea

Open MartinDawson opened this issue 7 years ago • 2 comments

https://github.com/andreypopp/react-textarea-autosize/blob/master/src/index.js#L82

Instead of rendering a <textarea /> this library should render children where the default props is a textarea with values.

This would give users who use this library more control if they wanted it with no downsides, it would not break existing users.

For example if I wanted to use Rebass TextArea then I would be able to specify my own text area element instead. At the moment this is impossible.

MartinDawson avatar Jul 22 '18 13:07 MartinDawson

Problem with your suggested approach is that we need to obtain DOM ref to getComputedStyle out of textarea.

Andarist avatar Jul 22 '18 14:07 Andarist

Not sure I follow you. Is what you are saying related to the calculateNodeHeight.js file? Can you tell me which part and why?

MartinDawson avatar Jul 22 '18 15:07 MartinDawson