abinavseelan / react-input-trigger

React component for handling character triggers inside textareas and input fields. 🐼
MIT License
88 stars 20 forks source link

Fix: Ref handling for wider support #16

Closed rheaditi closed 5 years ago

rheaditi commented 5 years ago

Fix: Ref handling for wider support

Change the way react-input-trigger receives/sets the ref to the input or textarea component. This change is introduced [after #10, #12] in order to offer wider support to projects using component libraries for their form input fields.

What changes

It's now mandatory for the consumer of react-input-trigger to pass the ref to the underlying input component - as opposed to react-input-trigger cloning the children and setting the ref.

Additional benefits