Can someone assist me with an issue I am having while filtering data from a list using Angular.js? I am also utilizing
angularUtils.directives.dirPagination
for paginating the list. Below is my code explanation:
<input class="form-control" placeholder="Type Restaurant Name" name="q" type="text" ng-model="searchProduct.rest_name">
<table class="table table-bordered table-striped table-hover" id="dataTable" >
<thead>
<tr>
<th>Sl. No</th>
<th>Restaurant Name</th>
</tr>
</thead>
<tbody id="detailsstockid">
<tr dir-paginate="cus in ($parent.labelResults=(listOfCustomerData | filter:searchProduct)) | itemsPerPage:5 track by $index">
<td>{{$index+1}}</td>
<td>{{cus.rest_name}}</td>
</tr>
</tbody>
</table>
<div class="pull-right">
<dir-pagination-controls max-size="5" direction-links="true" boundary-links="true" >
</dir-pagination-controls>
</div>
I am experiencing an issue where, when a user types a restaurant name in the text box, all restaurant names are displayed instead of only filtering based on the typed letters. Ideally, I want each letter typed to immediately filter down the restaurant list. Any assistance would be greatly appreciated.