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

ng-table watchs isDataReloadRequired() erroneously

Open zipper01 opened this issue 7 years ago • 0 comments

In ngTableController.ts subscribeToTableEvents(): this.$scope.$watch('params.isDataReloadRequired()', (newStatus: boolean/*, oldStatus*/) => { this.onDataReloadStatusChange(newStatus); });

In ngTableParams.ts: isDataReloadRequired() { // note: using != as want to treat null and undefined the same return !this.isCommittedDataset || !ng1.equals(this.createComparableParams(), this.prevParamsMemento) || this.hasGlobalSearchFieldChanges(); }

This means if isDataReloadRequired() returns true in the last digest and returns true again in THIS digest, the this.onDataReloadStatusChange(newStatus) will not be called and contents will not be refreshed because the watched value is not changed.

zipper01 avatar Feb 17 '18 05:02 zipper01