Skip to content

Add inputRef to FormControl component - #2337

Merged
taion merged 1 commit into
react-bootstrap:masterfrom
sorahn:form-control-input-ref
Nov 22, 2016
Merged

taion merged 1 commit into
react-bootstrap:masterfrom
sorahn:form-control-input-ref

Conversation

@sorahn

@sorahn sorahn commented Nov 16, 2016

Copy link
Copy Markdown
Contributor

This looks like what should be here. I was unable to get the tests to run on master, or on my branch. Here is a gist with the console output trying to run the tests.

https://gist.github.com/sorahn/a9a4f9d4d1fd0af24faa438336ca389d

Fixes #1887

@jquense

jquense commented Nov 22, 2016

Copy link
Copy Markdown
Member

this LGTM. thoughts from everyone else?

@taion

taion commented Nov 22, 2016

Copy link
Copy Markdown
Member

Question is inputRef v elementRef or nodeRef (domNodeRef?) to me... I guess inputRef is semantically safer, since even if the markup changes, it would still point to the <input>?

Code LGTM

@jquense

jquense commented Nov 22, 2016

Copy link
Copy Markdown
Member

I'd say the name is safe since the whole point of this ref is to imperatively get access to the value (yuck) so even if the markup changes it should always point to the input, like Checkbox

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.

3 participants