Skip to content

Create a reusable Pagination component #58

@s-laugh

Description

@s-laugh

Would building a component to help extrapolate something like the following be beneficial?
Would it need to address how the callback works to the controller/page, or is a pass through good enough?

<gcds-pagination label="Pagination"
				 total-pages="@Model.TotalPages"
				 current-page="@Model.Result.ResultSet"
				 url='{ "queryStrings": { "page::match": 1, "pageSize": @Model.Result.ResultSize } }'>
</gcds-pagination>

A fully loaded component might look more like the following.

<gcds-pagination
  display="simple"
  label="Pagination"
  previous-href="#previous"
  previous-label="previous label"
  next-href="#next"
  next-label="next label"
  lang="fr"
  url="{
  queryStrings: {
    // Key value pairs
    key: value,
  },
  fragment: string, // Target id
};"
>
</gcds-pagination>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions