Pagination breaks when reducing totalItems and page change is triggered
Reducing the totalItems and thus forcing the page to change causes this error message:
ORIGINAL EXCEPTION: Expression has changed after it was checked. Previous value: ''. Current value: '[object Object],[object Object],[object Object],[object Object],[object Object]'
Tracked it down to this line: https://github.com/valor-software/ng2-bootstrap/blob/fa22c98c157240ef0ef7d37d29c12beb5efdd2e6/components/pagination/pagination.component.ts#L233
I couldn't figure out the details. But an easy workaround was to change this line https://github.com/valor-software/ng2-bootstrap/blob/fa22c98c157240ef0ef7d37d29c12beb5efdd2e6/components/pagination/pagination.component.ts#L127
from
this.selectPage(this.page);
to simply writing the value
this.writeValue(this.page);
PS: See here for reference https://github.com/valor-software/ng2-table/issues/173
the suggested change seems to break the consistency of page number.
i have the same issue.. any solution? @valorkin @philippkoelmel
Works fine in [email protected] - https://plnkr.co/edit/Z1NjZjsSfwX5PCeKz85a?p=preview Closed as can't reproduce, will be reopened if we have sample to reproduce.