question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Page selector is not suitable for tables with many pages

See original GitHub issue

Title line template: [Title]: Brief description

The page selector on https://pages.github.ibm.com/security/carbon-addons-security/branch/v2/?path=/story/components-datatablepagination--pagination-data-table component is not suitable for tables with many pages

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

The page selector on https://pages.github.ibm.com/security/carbon-addons-security/branch/v2/?path=/story/components-datatablepagination--pagination-data-table component that we are using in our app is unsuitable when there are many pages in the table - would it be possible to use a different component?

Expected behavior -

User should be able to enter a number to select the page via, for example, a TextInput or a NumberInput component

Actual behavior -

The control is a Select inside the Pagination component, and when there are many pages the it is displayed outside the confines of the browser page, and user has to scroll up and down to find the required page and then select it. This is not an acceptable User Experience.

Steps to reproduce the issue

  1. Create around 650 entries in the data table pagination table
  2. Select 10 items per page
  3. Click on the page selector and observe it’s behaviour when trying to select a page, say page 60

Affected browsers All browsers, but worse on Chrome (as shown in screenshot)

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

3reactions
jendownscommented, Feb 7, 2020

@tw15egan Sorry for the delay getting back to you – we are slowly working this out in @carbon/ibm-security 😅

The plan is to refactor the Pagination component to be more like “building blocks”, similar to the UIShell for example, so that way folks have several options to deal with this issue:

  • Option 1 - do not include a child component we are calling the PageSelector (i.e., the select element that gets REALLY big when you have a bunch of numbers) at all.
  • Option 2 - pass a size attribute to the PageSelector to reduce the height of the selector (allow you to scroll within it). This was a proposal originally in https://github.com/carbon-design-system/carbon/pull/4378 but the reviewers weren’t fond of it (understandably so, due to the way it looked) – BUT on our end we are at least going to give people this option.
  • Option 3 - allow a number input instead of a select (this is not implemented yet & needs to be added)
  • Option 4?? - due to the building blocks style approach here, theoretically a consumer could make their OWN “Page Selector” or whatever the case may be, and then handle these large page numbers in their own way.

Anyway, now the plan is to polish this refactored pagination component – currently called UNSTABLE__Pagination in our library & then propose it back up to Carbon. It would be a breaking change, for sure.

EDIT: our UNSTABLE__Pagination (work in progress) is here: https://ibm-security.carbondesignsystem.com/?path=/story/components-unstable-pagination--default Again I’m still working on the optional number input. But right now you can leave out the select element, if you want, which would help people dealing with a LOT of pages that creates a performance hit.

2reactions
designertylercommented, Feb 20, 2020

@asudoh We mentioned a number input solution way back in https://github.com/carbon-design-system/carbon/pull/4378#issuecomment-546019688 and thought a number input would be a good solution for a large number of pages.

Carbon designers haven’t created design specs, @jendowns have you guys already done that for your option 3?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to scrape using rvest in pages with multiple tables
I'm trying to scrape the data from every table at the hockey-reference awards page. I can scrape the first table for the Hart...
Read more >
686. I have a large table in Word. How do I allow rows to split ...
Table selector; From the Table Tools, Layout tab, Table group, click the Properties icon; From the Table Properties dialog box, select the Row...
Read more >
Using Page Selectors to customize the context in your Views ...
Using a Multi-selection page selector allows for users to view one item, similar to a Single page, or you can combine items in...
Read more >
How to go next page if no next page link - Help - UiPath Forum
Query:- I have a page with table having multiple pages now issue is it doesnot have link of NEXT page. pagination look likes:-....
Read more >
CSS Paged Media Module Level 3 - W3C
Abstract. This CSS module specifies how pages are generated and laid out to hold fragmented content in a paged presentation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found