Skip to content

Commit 624d1c7

Browse files
committed
updated comment
1 parent 79ef5be commit 624d1c7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib/sort/sort-header.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,12 @@ export class MatSortHeader implements MatSortable {
293293
/**
294294
* Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be
295295
* facing the start direction. Otherwise if it is sorted, the arrow should point in the currently
296-
* active sorted direction.
296+
* active sorted direction. The reason this is updated through a function is because the direction
297+
* should only be changed at specific times - when deactivated but the hint is displayed and when
298+
* the sort is active and the direction changes. Otherwise the arrow's direction should linger
299+
* in cases such as the sort becoming deactivated but we want to animate the arrow away while
300+
* preserving its direction, even though the next sort direction is actually different and should
301+
* only be changed once the arrow displays again (hint or activation).
297302
*/
298303
_updateArrowDirection() {
299304
this._arrowDirection = this._isSorted() ?

0 commit comments

Comments
 (0)