-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/sort
Description
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
When a mat-sort-header uses [disabled] bound to a signal, sorting triggers NG0600: Writing to signals is not allowed while Angular renders the template. This happens because the signal is updated (disabled.set) during the sort event while Angular is still rendering.
Reproduction
StackBlitz link: https://stackblitz.com/edit/hgzpnems?file=src%2Fexample%2Fsort-overview-example.html,src%2Fexample%2Fsort-overview-example.ts
Steps to reproduce:
- Sort
headers
multiple times. - Check console
Headers use a disabled state which is enabled during execution of the sorting
Expected Behavior
No error in the console. Hard to figure out where the issue occured.
Actual Behavior
With disabled option for sorting there is an internal error.

Environment
- Angular: 20.1.0
- CDK/Material: 20.1.0
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows and macOs
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/sort