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

Pagination Component #139

Closed
Tracked by #64
muratcorlu opened this issue Jun 27, 2022 · 2 comments · Fixed by #261
Closed
Tracked by #64

Pagination Component #139

muratcorlu opened this issue Jun 27, 2022 · 2 comments · Fixed by #261
Assignees
Milestone

Comments

@muratcorlu
Copy link
Contributor

muratcorlu commented Jun 27, 2022

Figma

Implementation

General usage example:

<bl-pagination current-page=1 total-items=200 items-per-page=5 ></bl-pagination>

API Reference:

bl-pagination component

Pagination component is for listing the pages to the users and redirecting them between pages.

Attributes

Attribute Description Default Value
current-page (number) Sets the current page 1
total-items (number) Total number of data to be paginated -
items-per-page (number) Sets the number of items per page 100
has-jumper (boolean) Adds a jumper input to the pagination false
has-select (boolean) Adds select component to let users choose the result per page false
jumper-label (string) Sets the jumper label Go To
select-label (string) Sets select label Show
option-text (string) Sets the option texts of the select element Items

Events

Event Description Data
bl-change Fires everytime user selects a page ( {selectedPage,prevPage})
@muratcorlu muratcorlu mentioned this issue Jun 27, 2022
64 tasks
@muratcorlu muratcorlu added this to the v2.0 milestone Jun 28, 2022
@muratcorlu muratcorlu added the needs clarification Issues that needs more complete description label Jul 26, 2022
@muratcorlu
Copy link
Contributor Author

muratcorlu commented Sep 19, 2022

Hi @olkeoguz!

Please use kebab-case for attribute names (like current-page instead of currentPage).

"Rules" sections is for listing the behavioural rules (if we have any) about this component. If we don't have any rules, you can omit that part.

I assume bl-change event will contain the new page number in the event data. If so please mention it. And maybe we can consider to include previous page number in that event too. In some cases it would be helpful to track user interaction.

And what about labels for "results per page" select and "jumper" input? Do we consider to set them inside the component and not give a chance to customize them?

@olkeoguz
Copy link
Contributor

olkeoguz commented Sep 21, 2022

Hi @muratcorlu ,

  • Excellent idea to the add previous page in the event. Thank you.

  • About the last suggestion you made, I thought, we were considering to add the multi-language option to Baklava and these areas were supposed to be static. But it makes sence to allow users for the labels. If that's the final decision, i can add it.

  • I will update the rules part after we decide the result-per-page options.

@muratcorlu muratcorlu removed the needs clarification Issues that needs more complete description label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants