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

Let user clear the input with forceSelect set to true #100

Open
DamodarSojka opened this issue Sep 9, 2016 · 0 comments
Open

Let user clear the input with forceSelect set to true #100

DamodarSojka opened this issue Sep 9, 2016 · 0 comments

Comments

@DamodarSojka
Copy link

I would like to let users to clear selecting but on the same time restrict choice to options from predictions. When clearing input using backspace onBlur listener reselects last selection on line 135:
if ($scope.forceSelection) { $scope.selected = ($scope.selected === -1) ? 0 : $scope.selected; }
Input can be safely cleared by selecting whole input with for example ctrl-a and pressing backspace/delete. In such case first check ($scope.predictions.length === 0) in onBlur returns true and input gets cleared.

It seems that when input gets cleared predictions should also get cleared.

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

1 participant