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.

Not possible to disable Pagination pagesize input

See original GitHub issue

Title line template: [Title]: Brief description

There is no prop to disable selection of a new page size.

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

The bug is in the Pagination component. There is no prop to disable selection of a new page size. The pageInputDisabled prop only disables the input for selecting a predefined page, it does not disable the input for defining/selecting a new page size, hence it is not possible to completely disable the Pagination component.

Steps to reproduce the issue

  1. Set both pageInputDisabled and the general prop disabled to be true.
  2. Notice how the page size input is still enabled

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bjornalmcommented, May 28, 2020

In my particular case option 3 would work fine, and I think that would make most sense from an API/design perspective but perhaps there is a solid use case for keeping them separated that I can’t think of.

1reaction
nictownsendcommented, May 28, 2020

Personally, option 3 works for me - if you’re stopping people changing pages, it seems sensible to stop them changing page size too, as it somewhat equates to a pagination action (go from one page of 10 to showing 10 pages of 10).

I’d say it depends on the use case for disabled in general - I’m personally struggling to see why you would stop a user changing page, but allow them to change the page size.

Read more comments on GitHub >

github_iconTop Results From Across the Web

disable pagination if there is only one page in datatables
I'm doing following to achieve this goal, as it is more dynamic solution that is not expressed above.
Read more >
Using AWS CLI pagination options
Using your default output client-side paging program. ... Disabling pagination has the AWS CLI only call once for the first page of command...
Read more >
Pagination - Hot Chocolate - ChilliCream GraphQL Platform
Pagination is one of the most common problems that we have to solve when implementing our backend. Often, sets of data are too...
Read more >
Paginator | Angular Material
The current pageSize will always appear in the dropdown, even if it is not included in pageSizeOptions. If you want to customize some...
Read more >
Pagination - Angular powered Bootstrap
Pagination is a component that only displays page numbers. It will not manipulate your data collection. You will have to split your data...
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