Closed sdistefano closed 5 years ago
(bot)
Hey! Thank you so much for your PR! I can see that everything is green π.
Here is the playground for this revision π
I hope everything is fine! β€οΈ
Hey! Thanks for this! It makes sense - although it's still kinda bound to "textarea" because it expects that props like onChang
, onScroll
, will be there. Also, the ref
has to point to the actual textarea. Otherwise, it won't work correctly. Did you test it?
As I can see we'd have to use innerRef
https://github.com/buildo/react-autosize-textarea#refs-to-dom-nodes. What to do about this? Maybe the API could be textAreaComponent={Comp}
for easy implementation with the new React.forwardRef and for other cases it can take also {component: Comp, ref: "innerRef"}
I guess it will be good to do some kind of check after the first render, that this.textareaRef
is actually textarea ref.
What do you think about it? Are you able to deliver it? π
Hi Jacub! I'm on holidays now for a week. In my own implementation I wrote a thin wrapper around the target component that uses forwardRef. I like the api ;let me get back to this in a few days.
On Tuesday, January 1, 2019, Jakub BeneΕ‘ notifications@github.com wrote:
Hey! Thanks for this! It makes sense - although it's still kinda bound to "textarea" because it expects that props like onChang, onScroll, will be there. Also, the ref has to point to the actual textarea. Otherwise, it won't work correctly. Did you test it?
As I can see we'd have to use innerRef https://github.com/buildo/ react-autosize-textarea#refs-to-dom-nodes. What to do about this? Maybe the API could be textAreaComponent={Comp} for easy implementation with the new React.forwardRef and for other cases it can take also {component: Comp, ref: "innerRef"}
I guess it will be good to do some kind of check after the first render, that this.textareaRef is actually textarea ref.
What do you think about it? Are you able to deliver it? π
β You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/webscopeio/react-textarea-autocomplete/pull/113#issuecomment-450752183, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkn1WRA0vCSJcSVpIK54agJf7nX67E2ks5u-7kxgaJpZM4Zl7pD .
-- Silvio Di Stefano
Awesome. Good to hear that. Now, enjoy your vacation and let's discuss this once you will be back. πͺ
Hi! Updated as discussed
Thanks for your contribution! Deployed as 4.2.0 π
This change allows other components to be used, apart from a normal by means of the new textAreaComponent prop. This allows for other components such as react-textarea-autosize to be easily used in combination