Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear input #631

Open
frankdre opened this issue Nov 18, 2017 · 1 comment
Open

Clear input #631

frankdre opened this issue Nov 18, 2017 · 1 comment
Labels

Comments

@frankdre
Copy link

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
Copy link
Owner

this.index.getComponetMethods().search('')

Does that work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants