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

Autocomplete noSelectionClose event proposal #4796

Closed
radoslavpetranov opened this issue May 25, 2017 · 3 comments
Closed

Autocomplete noSelectionClose event proposal #4796

radoslavpetranov opened this issue May 25, 2017 · 3 comments

Comments

@radoslavpetranov
Copy link

Feature request / discussion

Expose an event that gets fired when the user closes an autocomplete without selecting an option

What is the expected behavior?

User clicks on Autocomplete and writes some text but doesn't select an option and then clicks somewhere to close the autocomplete. The written text should be replaced by null.

What is the current behavior?

What the user wrote remains in the autocomplete / form control.

What is the use-case or motivation for changing an existing behavior?

I have autocompletes for different enum-type structures that I've set up. I would like to make sure that if the user doesn't select an option I set the value to null instead of leaving invalid text in the form control value. I tried implementing this with a blur handler on the input but that gets fired even when the user selects an option from the list which is a show stopper.

@fxck
Copy link
Contributor

fxck commented May 25, 2017

dupe of #3334

@mmalerba
Copy link
Contributor

Closing as dupe

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants