Skip to content

dirPagination: Pagination not working after switch from asynchronous table to synchronous #174

@ArkoThor

Description

@ArkoThor

Hi, I'm using your pagination directive in project with combination of multiple synchronous and asynchronous tables on different pages and not using pagination-ids. It works great on all of them, only problem is when user switches from page with asynchronous table to page with synchronous one. Then only asynchronous work without refreshing the application.
In function dirPaginationLinkFn in dirPagination.js there is

if (typeof attrs.totalItems !== 'undefined') {
                    paginationService.setAsyncModeTrue(paginationId);

which switches on async mode, but then in else branch it doesn't switch the mode off.
I have changed it for my project to also switch off async mode by

} else {
                    paginationService.setAsyncModeFalse(paginationId);

and the switching from synchronous to asynchronous tables and back does not break paging for synchronous tables now. If it doesn't break anything else, it would probably be nice to fix it also in master.

And thanks for great directive :)

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions