问题
I am using an ng-table with select filters:
<table ng-table="wrCtrl.waitingRoomTable" show-filter="true" cellspacing="0">
<tr ng-repeat="item in $data" ng-form name="form-data">
<td data-title="'Status'" filter="{importStatusDisplayText: 'select'}" filter-data="ctrl.importStatuses" sortable="'importStatusDisplayText'">
<span id="importStatus">{{::item.importStatusDisplayText}}</span>
</td>
</tr>
</table>
The source array (importStatuses
) is:
[ {id: 0, displayText: "Created"},
{id: 1, displayText: "Error"},
{id: 2, displayText: "Success"},
{id: 3, displayText: "Rerun"},
{id: 4, displayText: "Resolved manually"},]
And it generates the following result in IE (tested with IE 11 and Edge). On Chrome it shows the drop down correctly.
importStatusDisplayText
is a property that takes the selected displayText value out of the importStatuses array.
This seems to be a problem with IE and ng-table as I get the same result on ng-table examples page.
Is there a way to fix this behavior also for IE?
回答1:
Take a look at this post: Add a NgTableParams setting to modify the default "-" value for SELECT filters
In my case I had to update ng-table manually, because I have an old version and can't update to latest version.
来源:https://stackoverflow.com/questions/44389303/ng-table-select-filters-show-double-blank-items-in-ie