I have a search field using Twitter typeahead with this Angular directive.
I can't figure out how to close the typeahead suggestions when I hit Enter (i.e. when none of the suggestions are picked). Can anyone help me out please?
I can fire search through a separate directive when Enter is pressed, but I don't know how to close the suggestions.
I could use this hack when I run search:
jQuery('.tt-dropdown-menu').hide();
jQuery('.tt-hint').hide();
and jQuery('.tt-hint').show();
on other key presses, but there must be a more proper way.