[Autocomplete] Hide options if clicked elsewhere.

This commit is contained in:
Dhrubomoy Das Gupta
2017-05-30 23:14:05 -04:00
parent 7f14397262
commit 7cdb8db775
2 changed files with 18 additions and 1 deletions

View File

@@ -30,7 +30,8 @@
<span class="icon-arrow-down"></span>
<div class="autocompleteOptions"
onload="hideOptions = false"
ng-hide="hideOptions">
ng-hide="hideOptions"
mct-click-elsewhere="hideOptions = true">
<ul>
<li ng-repeat="opt in filteredOptions"
ng-click="fillInput(opt.name)"