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

Add or clear current input value on blur and allow auto select on tab (for new values) #416

Closed
wants to merge 2 commits into from

Conversation

akum32
Copy link

@akum32 akum32 commented Aug 27, 2015

When new values are allowed:

  1. On blur, add the current input value, so when the user clicks away, it will be automatically added.
  2. On tab key press, add the current input value.

When new values are NOT allowed:

  1. On blur, clear the current input value.

@bruderstein
Copy link
Collaborator

I'm really not sure if I agree with this change in behaviour.

I'd be more inclined to offer some hooks so that the caller can do things like this on blur. We'd actually only need an onBlur hook (might be one already, but I'm on a phone, so can't easily check), and a getCurrentSearchText() public method.

@erikras
Copy link

erikras commented Sep 23, 2015

It's very unclear to the user whether or not a value is selected, or what the selected value is when the search input is not cleared on blur.

react-select-weird

@JedWatson
Copy link
Owner

Thanks for the PR @akum32

We've made a lot of changes since it was opened, so I'm going to close it. I do think our new props give you a similar level of control, but please let me know if this is still relevant.

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.

4 participants