1

Based on this answer I was able to solve my initial problem in capturing the selected item in a ngTypeahead input item.

But my issue now is if the user blanks out the field, is there an event or method of capturing that. aravind's Plunker in his answer show's the problem I'm looking a solution for. If you type a state in and then remove it the "clicked item" is not changed or removed. I need to capture when the field has change to a value not in the list.

ericgio
  • 3,094
  • 4
  • 25
  • 44
Craig
  • 111
  • 9

1 Answers1

0

I'm also running into this. For anyone who wants to know my workaround, add (change)=noItemSelected($event) to the ngbTypeahead input field. The (change) event fires before the (selectedItem) event does.

Really awful workaround, but I agree this is something that needs to be fixed with ngbTypeahead.

MattEnth
  • 843
  • 1
  • 7
  • 19