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(MatSortHeader): Apply cursor to mat-sort-header (instead of mat-sort-header-container) #30690

Closed
1 task
angelaki opened this issue Mar 22, 2025 · 1 comment · Fixed by #30696
Closed
1 task
Assignees
Labels
area: material/sort good first issue This issue is a good place to start for first time contributors to the project P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@angelaki
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

Right now the cursor: pointer automatically gets applied to mat-sort-header-container. Why not use mat-sort-header instead? Checking the example e.g. in the table (https://material.angular.io/components/sort/overview#using-sort-with-the-mat-table) there is a clickable area with no cursor indication. I think the cursor should be applied to the element implementing the click handler.

Reproduction

Just check your example (https://material.angular.io/components/sort/overview#using-sort-with-the-mat-table) and click in an area without cursor.

Expected Behavior

Just the area with cursor should handle the click.

Actual Behavior

No cursor, no handler.

Environment

Angular CLI: 19.1.9
Node: 22.11.0
Package Manager: pnpm 10.6.2
OS: win32 x64

Angular: 19.1.8
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker

Package Version

@angular-devkit/architect 0.1901.9 (cli-only)
@angular-devkit/build-angular 19.1.9
@angular-devkit/core 19.1.9 (cli-only)
@angular-devkit/schematics 19.1.9 (cli-only)
@angular/cdk 19.1.5
@angular/cli 19.1.9
@angular/material 19.1.5
@angular/material-luxon-adapter 19.1.5
@schematics/angular 19.1.9 (cli-only)
rxjs 7.8.2
typescript 5.7.3
zone.js 0.15.0

@angelaki angelaki added the needs triage This issue needs to be triaged by the team label Mar 22, 2025
@wagnermaciel wagnermaciel added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent good first issue This issue is a good place to start for first time contributors to the project area: material/sort and removed needs triage This issue needs to be triaged by the team labels Mar 24, 2025
@crisbeto crisbeto self-assigned this Mar 24, 2025
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 24, 2025
Sets the `cursor` on the entire sort header, rather than the inner container, since the whole element is clickable.

Fixes angular#30690.
crisbeto added a commit that referenced this issue Mar 24, 2025
Sets the `cursor` on the entire sort header, rather than the inner container, since the whole element is clickable.

Fixes #30690.

(cherry picked from commit 2d7da0a)
@angelaki
Copy link
Author

Wow, fast - ty 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/sort good first issue This issue is a good place to start for first time contributors to the project P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants