rpearce/react-expanding-textarea

Exposing ref

tknuts opened this issue · 4 comments

We need to be able to access "ref" on the textarea to be able to set focues() on the textarea from the parent.

Or you could expose a "SetFocus" prop :-)

I can consider forwarding a ref, but I'm not 💯 sure I want to do that (hooks don't generally like it when you make them conditional).

I'll come up with something but just need a little time to think about it!

@tknuts This should be resolved by #37 and is published in version 2.1.1.

I have also added you to the All Contributors list! Thank you for your contribution to this project.

image

ghert commented

@rpearce
Can you release new version?

@ghert That was a typo above; I meant 2.1.0. Here is the line in the CHANGELOG in the PR that added this functionality: https://github.com/rpearce/react-expanding-textarea/pull/37/files#diff-4ac32a78649ca5bdd8e0ba38b7006a1eR10

Sorry for the confusion!