Clear InputField

Hi,

I am using the InputField component from LightningUI. Is there a convenience method for clearing the input field. I want to do something like:

this.tag('InputField').clear()

I don’t see one:

there is a setter on inputText…

You may try this.tag('InputField').inputText = ''

Or recreate the input field with a new one.

Using this.tag('InputField').inputText = '' did clear the text, but it also cleared out the styling.

What worked for me was this.tag('InputField').onInputChanged('').

1 Like