ng-table select filters show double blank items in IE

雨燕双飞 提交于 2019-12-12 04:37:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!