Skip to content

useArrayPagination: currentPage stays at 0 when filling empty array #1039

Open
@Larsluph

Description

@Larsluph

Observed behavior

  1. Create pagination with empty array (lastPage: 0 => currentPage: 0)
  2. Fill array with data (API call or just async delay)
  3. Empty results (lastPage: 114, currentPage: 0 != 1)

Expected behavior

  1. Create pagination with empty array (currentPage: 0)
  2. Fill array with data
  3. First page is shown (currentPage: 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions