Skip to content
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

bug(COMPONENT): MatPaginator should not be able to move to previous or next pages if disabled #30124

Closed
1 task done
erikrestificar opened this issue Dec 3, 2024 · 0 comments · Fixed by #30138
Closed
1 task done
Assignees
Labels
area: material/paginator P2 The issue is important to a large percentage of users, with a workaround

Comments

@erikrestificar
Copy link

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

MatPaginator should not be able to move to previous or next pages if disabled

Breaking change: #29379

Reproduction

  1. Go to MatPaginator Demo
  2. Select disabled
  3. Click next page button

Expected Behavior

Clicking next page should have no effect because its disabled

Actual Behavior

User is able to go to next page

Environment

Any environment

@erikrestificar erikrestificar added the needs triage This issue needs to be triaged by the team label Dec 3, 2024
@crisbeto crisbeto self-assigned this Dec 6, 2024
@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround area: material/paginator and removed needs triage This issue needs to be triaged by the team labels Dec 6, 2024
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 6, 2024
The changes in angular#29379 made the paginator interactive while they're disabled in order to improve accessibility, but as a result it also allows for the buttons to navigate while they're disabled.

These changes add internal checks to ensure that the buttons don't navigate while disabled. I've also cleaned up the logic a bit so we don't have four different places that deal with navigations.

Fixes angular#30124.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 6, 2024
The changes in angular#29379 made the paginator interactive while they're disabled in order to improve accessibility, but as a result it also allows for the buttons to navigate while they're disabled.

These changes add internal checks to ensure that the buttons don't navigate while disabled. I've also cleaned up the logic a bit so we don't have four different places that deal with navigations.

Fixes angular#30124.
crisbeto added a commit that referenced this issue Dec 9, 2024
The changes in #29379 made the paginator interactive while they're disabled in order to improve accessibility, but as a result it also allows for the buttons to navigate while they're disabled.

These changes add internal checks to ensure that the buttons don't navigate while disabled. I've also cleaned up the logic a bit so we don't have four different places that deal with navigations.

Fixes #30124.

(cherry picked from commit 8d3bca5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/paginator P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants