Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Ref handling for wider support #16

Merged
merged 7 commits into from
Jun 22, 2019
Merged

Conversation

rheaditi
Copy link
Collaborator

@rheaditi rheaditi commented Jun 22, 2019

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

  • No cloning children - children can be any React component & no loss of lifecycle hooks.

@rheaditi rheaditi force-pushed the bugfix/broken-ref branch from f0d2fe7 to 4d38bc0 Compare June 22, 2019 09:26
@rheaditi rheaditi changed the base branch from master to pre-release/2.0.0 June 22, 2019 09:26
Copy link
Owner

@abinavseelan abinavseelan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 🚀

@rheaditi rheaditi merged commit 7fd40ea into pre-release/2.0.0 Jun 22, 2019
@rheaditi rheaditi deleted the bugfix/broken-ref branch June 22, 2019 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants