Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the Pagination components #178

Open
elboletaire opened this issue Jun 10, 2024 · 1 comment
Open

Create the Pagination components #178

elboletaire opened this issue Jun 10, 2024 · 1 comment
Assignees
Labels
chakra-components Things related to the chakra-components package enhancement New feature or request react-providers

Comments

@elboletaire
Copy link
Member

I've recently created a set of pagination components that we ended up copy-pasting in different repos, and it totally makes sense to have them here in chakra-components.

The version to be used as reference should be the one in the new explorer: https://github.com/vocdoni/explorer/tree/main/src/components/Pagination

Things to keep in mind:

  • We'll add a new peer dependency, react-router-dom, since the RoutedPagination depends on it.
  • Due to that, paginators should be in different files probably, to avoid issues for people that do not have the package and want to use the non routed one.
@elboletaire elboletaire added the enhancement New feature or request label Jun 10, 2024
@elboletaire elboletaire self-assigned this Jun 10, 2024
@elboletaire elboletaire added the chakra-components Things related to the chakra-components package label Jun 10, 2024
@elboletaire
Copy link
Member Author

Probably the context and provider should be moved to the react-providers package... but assess if it makes sense, since it does not have much logic... considering is a really simple context and provider, maybe we should consider doing some context and provider creator, and have that in the providers...

elboletaire added a commit that referenced this issue Sep 6, 2024
elboletaire added a commit that referenced this issue Sep 6, 2024
* refs #178 Add pagination providers and components

* Use PaginationResponse on the paginator

* Improve docs

* Use styled components

* Export missing

* Update paginator

* Update docs

* refs #178 Run prettier

* Use inner page state on routed paginator

On this way it will update selected page faster

---------

Co-authored-by: selankon <selankon@selankon.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chakra-components Things related to the chakra-components package enhancement New feature or request react-providers
Projects
None yet
Development

No branches or pull requests

1 participant