ng-table select filters在IE中显示双空白项 [英] ng-table select filters show double blank items in IE
问题描述
我正在使用带有选择过滤器的ng表:
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>
源数组( importStatuses
)是:
[ {id: 0, displayText: "Created"},
{id: 1, displayText: "Error"},
{id: 2, displayText: "Success"},
{id: 3, displayText: "Rerun"},
{id: 4, displayText: "Resolved manually"},]
它在IE中生成以下结果(使用IE 11和Edge测试)。在Chrome上,它会正确显示下拉列表。
And it generates the following result in IE (tested with IE 11 and Edge). On Chrome it shows the drop down correctly.
importStatusDisplayText
是一个属性,它将所选的displayText值从importStatuses数组。
importStatusDisplayText
is a property that takes the selected displayText value out of the importStatuses array.
这似乎是一个IE和ng-table的问题,因为我在ng-table上得到了相同的结果示例页。
This seems to be a problem with IE and ng-table as I get the same result on ng-table examples page.
有没有办法解决IE的这种行为?
Is there a way to fix this behavior also for IE?
推荐答案
看一下这篇文章:
添加一个NgTableParams设置为修改SELECT过滤器的默认 - 值
在我的情况下,我必须手动更新ng-table,因为我有一个旧版本,无法更新到最新版本。
In my case I had to update ng-table manually, because I have an old version and can't update to latest version.
这篇关于ng-table select filters在IE中显示双空白项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!