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

Always show newSelectionPrefix #54

Closed
fmapilis opened this issue Aug 6, 2016 · 3 comments
Closed

Always show newSelectionPrefix #54

fmapilis opened this issue Aug 6, 2016 · 3 comments

Comments

@fmapilis
Copy link

fmapilis commented Aug 6, 2016

Hey there,

I was wondering if it would be possible to have the "New Selection" always appear, or at least have a prop to toggle the behavior. At the moment, if the value in the Typeahead matches part of one of the options, the new selection bit is left off.

Example: The word "Carpet" is a possible choice for the Typeahead, but the user would like to enter the word "Car" as a new selection, but is unable to since "Carpet" is the only option.

@ericgio
Copy link
Owner

ericgio commented Aug 6, 2016

Thanks for the report/suggestion/request. I see what you're saying. Yeah, I think the current behavior is a borderline bug; it should probably display the new selection option if there's not an exact match, as you describe. I don't think the component should show the option if there is an exact match, though (thus allowing a duplicate entry). Let me know what you think.

ericgio added a commit that referenced this issue Aug 7, 2016
@fmapilis
Copy link
Author

fmapilis commented Aug 7, 2016

That sounds fair - the new selection should only display if there isn't an exact match found to avoid duplicates.

Thanks for addressing this so quickly!

daiyi pushed a commit to mesosphere-backup/react-typeahead that referenced this issue Aug 9, 2016
@ericgio
Copy link
Owner

ericgio commented Aug 9, 2016

Fixed in v0.8.4

@ericgio ericgio closed this as completed Aug 9, 2016
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

No branches or pull requests

2 participants