ng-table icon indicating copy to clipboard operation
ng-table copied to clipboard

custom filter with text input and custom filtering function

Open michas84 opened this issue 12 years ago • 1 comments

Hi, Is there possibility to use custom filtering function for some of the text input filters? I have set of columns with standard text input filters and for some of them I want to use my own filtering function, not default angular $filter('filter')(array, params.filter()), but something like $filter('myOwnFilter')(array, params.filter()).

I want it to work the same way as default text filtering works now, but another filter function to be executed. What I have:

< td class="text-left" data-title="'Name'" filter="{ 'Column': 'myOwnFilter' }" data-sortable="'Column'"> {{ array.Column }}< /td>

and the template:

< script type="text/ng-template" id="ng-table/filters/myOwnFilter.html"> < input type="text" name="myOwnFilter" data-ng-model="params.filter()[name]" data-ng-if="filter == 'myOwnFilter'" class="input-filter form-control"/> < /script>

michas84 avatar Jun 13 '14 12:06 michas84

hello, I asked this on stackoverflow as well, so far no answear... http://stackoverflow.com/questions/24264139/angular-custom-filtering-in-ngtables

michas84 avatar Jul 04 '14 08:07 michas84