Reset button for input field in ionic2
1 answer
<ion-item>
<ion-label>Clear Icon</ion-label>
<ion-input placeholder="Clear Input" clearInput></ion-input>
</ion-item>
Just add an attribute to your inputs clearinput
and it will display a button x
on the right side of the input.
There is also an attribute clearOnEdit
that clears up the input when the user focuses on it again.
Hope it helps
+9
source to share