add function to bootstrap input clear button code example
Example: boostrap 4 clear input
<div class="input-group">
<input type="text" class="form-control" placeholder="Search...">
<button class="btn bg-transparent" style="margin-left: -40px; z-index: 100;">
<i class="fa fa-times"></i>
</button>
</div>