I am trying to filter an angular-datatable. The search box by default searches all of the values in ng-model and filters the table accordingly.
I need to store the ID of the select list in the database but I want to search by the Name displayed on the list:
<tbody>
<tr ng-repeat="waiver in model.waivers | filter:model.searchValue">
<td><select ng-model="waiver.CarrierID" ng-options="carrier.Key as carrier.Value for carrier in model.Carriers" ng-change="UpdateLists(waiver)"></select></td>
<td><select ng-model="waiver.CategoryID" ng-options="category.Key as category.Value for category in model.Categories"></select></td>
//Several more TD's with selectLists etc
</tr>
</tbody>
When I put 1234 in the search box then It filters to one carrier. What I want to do is put UPS in the box and have it filter to that.
UPDATE:
I have now added The carrier name to the model so waiver.CarrierName has the value I want to search by. I am still unable to get it to narrow the results by that value:
<td style="display:none"><input type="hidden" ng-model="waiver.CarrierName" />
With that it still can't find just the data associated to UPS. If I search any of the non select list values it shrinks the table to the correct data.