【问题标题】:ng-table select filters show double blank items in IEng-table 选择过滤器在 IE 中显示双空白项
【发布时间】:2017-11-07 10:17:33
【问题描述】:

我正在使用带有选择过滤器的 ng-table:

<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 上,它会正确显示下拉菜单。

importStatusDisplayText 是一个从 importStatuses 数组中取出所选 displayText 值的属性。

这似乎是 IE 和 ng-table 的问题,因为我在 ng-table examples page 上得到了相同的结果。

有没有办法修复 IE 的这种行为?

【问题讨论】:

    标签: angularjs internet-explorer html-select ngtable


    【解决方案1】:

    看看这个帖子: Add a NgTableParams setting to modify the default "-" value for SELECT filters

    在我的情况下,我不得不手动更新 ng-table,因为我有一个旧版本,无法更新到最新版本。

    【讨论】:

    • 感谢您的链接,但不能完全解决我的问题。我在 ng-table 网站和他们的网站上检查过,如果您使用 IE 访问它们,它们会遇到完全相同的问题。我还尝试更改有关选择过滤器的默认值的源代码,但在 IE 中它并没有解决问题。
    • 没错,IE 上没有 :(
    • 您找到解决方案了吗?我在 Safari 中也有同样的问题
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-10
    • 2014-11-10
    相关资源
    最近更新 更多