Closed amnevins closed 9 years ago
Just add an ID to the input field, e.g. like this:
{> inputAutocomplete settings=settings class="form-control" id="auto-input"}}
and then call
document.getElementById('auto-input').value = '';
whenever you want to clear the input box.
Thanks for answering !
I am using your package and love it. Users can select their favorite brands, and upon selection I add them to the users favorites. However, the box remains filled with the brand name they just selected and they have to delete the name to add another. Is there an easy way to immediately set the boxes value back to blank after they select it from the drop down? I appreciate the help, thanks for the awesome work!
Template.favorites.events({ "autocompleteselect input": function(event, template, doc) { //console.log("selected ", doc);
});