akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 878 forks source link

How to search column after applying valuePrepareFunction() #640

Open nitinsh99 opened 6 years ago

nitinsh99 commented 6 years ago

For example if one of the column in my schema has following definition:

 flag: {
        title: 'Flag',
        type: 'string',
        valuePrepareFunction: (value) => {
          return (value === true) ? 'On' : 'Off';
        }
      }, 

I can search the column by "true" or "false" but NOT by "On" or "Off". Is there way I can override search/filter logic so I can search by the transformed value of the column data?

I looked in documentation and I see we have "filterFunction" property but not sure how it can be used in my case? Thanks

jarredszabadi commented 6 years ago

Duplicate of # https://github.com/akveo/ng2-smart-table/issues/351