matteodem / meteor-easy-search

Easy-to-use search for Meteor with Blaze Components
MIT License
438 stars 68 forks source link

Clear input #631

Open frankdre opened 6 years ago

frankdre commented 6 years ago

How to clear the content of the input tag?

var dict = this.index.getComponentDict();
var methods = this.index.getComponentMethods();
// do this:
methods.reset();
// or do that:
dict.set('searchDefinition',"");

Both lines have the expected effect on components like IfInputEmpty. However, although IfInputEmpty= true, there is still something visible in the input tag itself. Currently I'm adding this on top: $("#searchInput").val("") and adding the id searchInput with inputAttributes. Am I doing something wrong or is that the way to go?

matteodem commented 2 years ago
this.index.getComponetMethods().search('')

Does that work?