Skip to content

Commit 99a3fa9

Browse files
devversionVivian Hu
authored andcommitted
fix(sort): indicator hint not showing up on mobile
* Due to the fact that the sort module uses the `(longpress)` event, the custom HammerJS gesture config needs to be provided. Related to #12940
1 parent 6c741c4 commit 99a3fa9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib/sort/sort-module.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88

99
import {NgModule} from '@angular/core';
10+
import {GestureConfig} from '@angular/material/core';
11+
import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser';
1012
import {MatSortHeader} from './sort-header';
1113
import {MatSort} from './sort';
1214
import {MAT_SORT_HEADER_INTL_PROVIDER} from './sort-header-intl';
@@ -17,6 +19,9 @@ import {CommonModule} from '@angular/common';
1719
imports: [CommonModule],
1820
exports: [MatSort, MatSortHeader],
1921
declarations: [MatSort, MatSortHeader],
20-
providers: [MAT_SORT_HEADER_INTL_PROVIDER]
22+
providers: [
23+
MAT_SORT_HEADER_INTL_PROVIDER,
24+
{provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig},
25+
]
2126
})
2227
export class MatSortModule {}

0 commit comments

Comments
 (0)