-
-
Notifications
You must be signed in to change notification settings - Fork 160
Pagination #1093
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 #1093
Conversation
lovasoa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks ! Can we fix the icons in the template, and add clear warnings in the component documentation and blog post that this approach does not scale, and using OFFSET on large datasets is slow.
This approach is interesting only for datasets that are big enough not to be realistically loadable on a single webpage, yet small enough for being queryable with OFFSET...LIMIT
| <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" | ||
| viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" | ||
| stroke-linecap="round" stroke-linejoin="round" class="icon icon-1"> | ||
| <path d="M11 7l-5 5l5 5" /> | ||
| <path d="M17 7l-5 5l5 5" /> | ||
| </svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use the existing handlebars helper for integrating icons by their name ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I agree with you on the performance aspect. I wanted to propose a simple and portable method to illustrate the use of the pagination component. I suggest adding this at the beginning of the post:
"This article serves as a tutorial on the pagination component, rather than an advanced guide on paginated data retrieval from a database. The document employs a straightforward approach using the LIMIT and OFFSET instructions. This approach is interesting only for datasets that are big enough not to be realistically loadable on a single webpage, yet small enough for being queryable with OFFSET...LIMIT."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will attempt to use Handlebars helpers for the icons, but I encountered some difficulties while creating the component. I'll investigate further.
|
Hi, I am attempting to use icon_img instead of SVG code for the icons, but I am encountering a height issue. Links containing an icon have a height that is 3 pixels greater than links containing text (such as page numbers). In the examples from Tabler.io, this problem is resolved by applying the icon and icon-1 classes to the SVG image. These classes reduce the size by 1 pixel in both height and width, changing the image from 24x24 pixels to 23x23 pixels. As a result, all the boxes have the same height. How can I achieve the same result? |
|
@olivierauverlot you can use the second parameter to icon_img to set the image size:
|
|
Thank you for the tip about the icon_img parameter. I was not aware of it. I have made the necessary corrections in the template of the pagination component. |
Pagination is a component that enables users to navigate through a large dataset.
The data is divided into pages, each containing a fixed number of rows.
This component is typically used in conjunction with a table component.
The pagination component offers numerous customization features:
An article for the blog is included in this pull request to provide an example of managing the pagination component.