Skip to content

pagination.control.ts - startBlockMaxLength and endBlockMaxLength overlap #1

Description

@ssvi54

For 101 total items with 10 items per page, let PaginationControl be constructed with the following options:

{
startBlockMaxLength: 7,
middleBlockMaxLength: 5,
endBlockMaxLength: 7,
defaultTotalPages: Math.ceil(101 / 10),
}

In this case, we have total pages = 11. Thus, canPaginate() will yield true.

Issue: With canPaginate() giving true and both isInStartBlock()and isInEndBlock() yielding true for pages 5, 6 and 7,
we can have these pages appear in both starting and ending blocks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions