I have AngularJs client application which displays data in table using dir-paginate directive of dirPagination.js
<tr dir-paginate="user in Results| filter: vm.searchKeyword |orderBy:orderByField:vm.reverseSort| itemsPerPage:30" current-page="vm.current_page">Here is the search input
<input type="text" ng-change="vm.SomeTask()" ng-model="vm.searchKeyword" />searching takes a lot of time as on every key input ng-change function is called. when I erase a name in the Search function and type in a new name there is a significant delay, like 20 seconds or so, for the system to catch up to my typing.
There is no change in performance even if I replace dir-paginate with ng-repeat.
SomeTask function computes pageindex for paging (like for showing 1 to 30 of 100 results). Even if we remove ng-change not sure where to compute the pageindex of the filtered result set.
Any help would be highly appreciated.
Thanks
I have AngularJs client application which displays data in table using dir-paginate directive of dirPagination.js
<tr dir-paginate="user in Results| filter: vm.searchKeyword |orderBy:orderByField:vm.reverseSort| itemsPerPage:30" current-page="vm.current_page">Here is the search input
<input type="text" ng-change="vm.SomeTask()" ng-model="vm.searchKeyword" />
<input type="text" ng-change="vm.SomeTask()" ng-model="vm.searchKeyword" ng-model-options="{debounce: 500}"/><tr dir-paginate="user in (filteredResults = (Results| filter: vm.searchKeyword |orderBy:orderByField:vm.reverseSort )| itemsPerPage:30)" current-page="vm.current_page">