I'm working on an AngularJS table and I need to add a text field for filtering/searching. However, the automatically generated icon is not displaying in the right place.
Here is my current view:
<table>
<theader>
<tr>
<th at-attribute="Car_ID">
Test <br />
<input type="text" id="filter_id" ng-model="filter_id" />
</th>
</tr>
</theader>
</table>
Is there a way to move the sort arrow next to Test
? I think it would look better there. Alternatively, how can I add another <tr>
below the first one to display the search texts?
https://i.sstatic.net/YWVYU.png
This snippet shows the rendered HTML code where the automatic <i>
element is added by AngularJS:
<th at-attribute="Car_ID" ng-click="predicate = 'Car_ID'; descending = !descending;" width="">
Test <br>
<input type="text" id="filter_id" ng-model="filter_id" class="ng-pristine ng-untouched ng-valid">
<i style="margin-left: 10px;" ng-class="getSortIcon('Car_ID', predicate, descending)" class="glyphicon glyphicon-chevron-down"></i>
</th>