Skip to content

pagination and max-size #287

@PhilFlash

Description

@PhilFlash

Hi,
If I change the value of max-size (in dir-pagination-controls), the number of pagination links to display is not updated.
IMHO, the variable "paginationRange" is not updated in dirPaginationControlsLinkFn function.
In my case, I have replaced (in 2 functions : goToPage and generatePagination)

scope.pages = generatePagesArray(num, paginationService.getCollectionLength(paginationId), paginationService.getItemsPerPage(paginationId), paginationRange);
}

by
}

scope.pages = generatePagesArray(num, paginationService.getCollectionLength(paginationId), paginationService.getItemsPerPage(paginationId), Math.max(scope.maxSize, 5));
}

and all is ok for me. But I am not sure that this patch is ok for all cases.

Philippe

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions