Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(material/sort): error if signal is bound to disabled input #31776

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

Merged
crisbeto merged 1 commit into angular:main from crisbeto:31723/sort-header-error
Aug 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/material/sort/sort-header.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,11 @@ export class MatSortHeader implements MatSortable, OnDestroy, OnInit, AfterViewI
ngAfterViewInit() {
// We use the focus monitor because we also want to style
// things differently based on the focus origin.
this._focusMonitor
.monitor(this._elementRef, true)
.subscribe(() => this._recentlyCleared.set(null));
this._focusMonitor.monitor(this._elementRef, true).subscribe(() => {
// We need the delay here, because we can trigger a signal write error if the header
// has a signal bound to `disabled` which causes it to be blurred (see #31723.)
Promise.resolve().then(() => this._recentlyCleared.set(null));
});
}

ngOnDestroy() {
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /