Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-table watchs isDataReloadRequired() erroneously #1033

Open
zipper01 opened this issue Feb 17, 2018 · 0 comments
Open

ng-table watchs isDataReloadRequired() erroneously #1033

zipper01 opened this issue Feb 17, 2018 · 0 comments

Comments

@zipper01
Copy link

zipper01 commented Feb 17, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant