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

feat(button;forms): Expose ref for focusable elements #587

Closed
wants to merge 1 commit into from
Closed

feat(button;forms): Expose ref for focusable elements #587

wants to merge 1 commit into from

Conversation

skvale
Copy link
Contributor

@skvale skvale commented Jun 11, 2019

Description

Forward refs to:

  • Button
  • FormInput
  • FormRadioItem
  • FormSelect
  • FormTextArea

Others components that this may be expected on:

  • Toggle (Breaking change if somebody is relying on ref.handleChange)
  • Tab (<a>)
  • SearchInput (<input>)
  • Combobox (<input>)

fixes #576

@netlify
Copy link

netlify bot commented Jun 11, 2019

@bcullman
Copy link
Contributor

should forward-ref be considered a breaking change? See:
https://reactjs.org/docs/forwarding-refs.html#note-for-component-library-maintainers

@skvale
Copy link
Contributor Author

skvale commented Jun 27, 2019

@bcullman The components I updated in this PR were all stateless functional components. As I understand it, refs had no functionality on them anyways, so there is nothing to break.

I purposely didn't update the React.Components in this PR. e.g.

Toggle (Breaking change if somebody is relying on ref.handleChange)

To avoid those breaking changes. Maybe keeping the ref on the component is desired in some of those cases?

@skvale skvale closed this Sep 17, 2019
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.

expose ref for focus able element
2 participants