Ngx-chips: how to clear entered text from input?

Created on 8 Dec 2016  路  3Comments  路  Source: Gbuomprisco/ngx-chips

We are looking for a way that how to remove text from text input onBlur event.

help wanted

Most helpful comment

Hi @sivamamidi-REISys,

This is now possible. Check the input [clearOnBlur]="true"

All 3 comments

HI @sivamamidi-REISys,

There should be a way by registering a reference on the component and reset its form's value. I need to dig in the code and try it out to be sure though. Will let you know.

Hi @sivamamidi-REISys,

I haven't tried this yet, but it should work: try using the onBlur event to be notified when a new item is added. Reference a local variable for the form you wish to clear and call

myInput.inputForm.value.setValue('');

Of course, this wouldn't work if you need to create dynamic forms.

I'll probably be adding a property clearOnBlur in the near future

Hi @sivamamidi-REISys,

This is now possible. Check the input [clearOnBlur]="true"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HDaghash picture HDaghash  路  4Comments

neilharding picture neilharding  路  5Comments

anikets43 picture anikets43  路  4Comments

ImChamZ picture ImChamZ  路  5Comments

admix picture admix  路  5Comments