Skip to content

Commit

Permalink
fix(material/sort): clear aria description on destroy
Browse files Browse the repository at this point in the history
Fixes that the sort header wasn't clearing its ARIA description when it gets destroyed, causing a memory leak.
  • Loading branch information
crisbeto committed Mar 30, 2024
1 parent 46db6a6 commit 020572a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/material/sort/sort-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export class MatSortHeader implements MatSortable, OnDestroy, OnInit, AfterViewI
ngOnDestroy() {
this._focusMonitor.stopMonitoring(this._elementRef);
this._sort.deregister(this);
this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);
this._rerenderSubscription.unsubscribe();
}

Expand Down

0 comments on commit 020572a

Please sign in to comment.