How to have select filter in ngtable?

前端 未结 3 1244
自闭症患者
自闭症患者 2020-12-12 06:34

I am trying to have a select filter in ngtable. I followed this example but looks like if the select item has a space (eg: Not Installed or Not Running

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 07:30

    if Okonomy is saying that you could just do the following

    filter="{ 'name': 'select' : true }"
    

    i did not find this to be true. You would need to go into the .js file controlling that page and do something more like the below.

    var newStudies = $filter('filter')(controller.TableData, params.filter(), true);

    But this forces all filters in the table to exact match (and therefore your table would be empty). So you have to make a custom filter. There are examples of custom attributes here in the below link. Not great examples, but it is an example: custom filter example for ng-table

提交回复
热议问题