What component to use for pagination (Prev vs. Next) #938
-
Hello, What component paste (anchor vs. link button) may I use for pagination for Prev / Next? If we use the link button |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @ishah-twilio - Does each page in the table have its own URL? If so, then you should use Anchor for "Next" and "Previous". If each page does NOT have its own URL, then you should use Button. If you end up using Button, then you can just use a disabled button when the user is on the first or last page. If you end up using Anchor, I would suggest just hiding the "Next" or "Previous" link when the user is on the first or last page. Links / Anchors cannot have a |
Beta Was this translation helpful? Give feedback.
-
@katieporter Pagination will have its own url. So Next and Previous will be anchor component and will hide the link on first and last page. Thank you. |
Beta Was this translation helpful? Give feedback.
Hi @ishah-twilio -
Does each page in the table have its own URL? If so, then you should use Anchor for "Next" and "Previous". If each page does NOT have its own URL, then you should use Button.
If you end up using Button, then you can just use a disabled button when the user is on the first or last page.
If you end up using Anchor, I would suggest just hiding the "Next" or "Previous" link when the user is on the first or last page. Links / Anchors cannot have a
disabled
state, so that's probably the easiest approach.