I want to create typeahead in a form where input is created on click of a button dynamically. I have been able to generate the typeahead successfully for that.
But when I click on the button again and a new input box is created it shows the suggestions hit in the previous box. When I type in the new box again it starts working properly. I have tried to remove the cache, clear the textbox and the typeahead, destroy the typeahead before regenerating it, but nothing seems to be working.