-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Page selector is not suitable for tables with many pages #4365
Comments
Researching this a little... we could technically use a It would definitely have to be something that is only used I'll give this a try in a bit & see about a PR 👍 |
Please bear in mind #4070 - with a large number of pages, it results in many Also, it looks like |
Hello @nictownsend --
I'm not sure what you mean here? Can you link to a spec / example? I whipped up a quick codepen that demonstrates using https://codepen.io/jendowns/pen/bGGoxZL From what I see, it looks like
The example above, in this issue, has 69 pages and shows the Maybe But that would require a much more extensive refactor of this component... and I wonder if it isn't something that should be presented in something other than a I'm just wondering what user would ever say "oh yes, I'd like to jump exactly to page 953261" or even just page through to that page? Seems like some dedicated research would be helpful in this scenario? |
Apologies - you're right, for some reason the codepen I was using must not have been updating properly as when I was setting size it was still using the dropdown list. And yes, I do agree that this is not a catch all solution for the large list - that case definitely requires a researched refactor. I just wanted to draw attention in case it influenced a decision on this particular use case (or if documentation could be updated with guidance on the prop that it doesn't solve the large options problem). |
Agreed, it definitely needs some attention... For the Security team, we just prioritized a research spike to look into this (I mean, beyond a |
@jendowns have y'all figured out any type of solution to this? It seems to still present when there are a large number of pages... |
As #5129 tells, having many |
@tw15egan Sorry for the delay getting back to you -- we are slowly working this out in The plan is to refactor the
Anyway, now the plan is to polish this refactored pagination component -- currently called EDIT: our |
@jendowns no worries, that sounds like a great plan. Looking forward to seeing the polished up version! 🎉 |
@jendowns Number input sounds a viable option, if our designers agree. CC @carbon-design-system/design |
@asudoh We mentioned a number input solution way back in #4378 (comment) 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? |
@designertyler My apologies for missing this. Looking forward to seeing a spec! |
This cause the browser to hang as per carbon-design-system/carbon-components-vue#831 for large total items Chrome, Opera and Mozilla limited selects to 10000 options according to https://chromium.googlesource.com/chromium/blink.git/+/master/Source/core/html/HTMLSelectElement.cpp#77 The current workaround in @carbon/vue is not to specify the number of items. A number input or similar would be the usual solution. |
@designertyler Sorry for the delay getting back to you -- So unfortunately I have received no guidance on a "number input" inside my pagination refactor. The biggest thing I don't know, as I mentioned to you a while ago in that closed PR, is the "error" or invalid state -- would there be an error message, and where would it go? For now I am just proceeding with what I can do. Linked issue is here: carbon-design-system/ibm-security#295 And just to reiterate, I did refactor the I was planning to try to contribute this pagination refactor back to Carbon core once I finished with the number input option -- but would it be better if I just open a draft PR now so we can get more eyes on it? I am very, very open to any and all opinions on implementation etc. I haven't received much in the way of design direction either (namely, with the number input), so would appreciate any help there as well. (@joshblack @tw15egan do either of you have an opinion?) |
Definitely think Number Input (mobile variant may work best) is the way to go, but also curious how we would handle the error state. Design will need to work that out before we're able to implement anything, so a draft PR may help to get some eyes on the problem if you have the time 🙏 |
We're running into this as well in @lukefirth are there any further UX concerns that you're aware of that we should feed in here? I think the options laid out above and in #5546 should meet most/all our problems. |
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
Affected browsers
All browsers, but worse on Chrome (as shown in screenshot)
The text was updated successfully, but these errors were encountered: