mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(tabs): add automatic scrolling when holding down paginator (#14632)
Adds some code that automatically keeps scrolling the tab header while holding down one of the paginator buttons. This is useful on long lists of tabs where the user might have to click a lot to reach the tab that they want. Fixes #6510.
This commit is contained in:
committed by
Andrew Seguin
parent
a4d943cfbb
commit
e66131744a
Vendored
+11
-2
@@ -109,11 +109,13 @@ export declare class MatTabGroupBase {
|
||||
constructor(_elementRef: ElementRef);
|
||||
}
|
||||
|
||||
export declare class MatTabHeader extends _MatTabHeaderMixinBase implements AfterContentChecked, AfterContentInit, OnDestroy, CanDisableRipple {
|
||||
export declare class MatTabHeader extends _MatTabHeaderMixinBase implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy, CanDisableRipple {
|
||||
_disableScrollAfter: boolean;
|
||||
_disableScrollBefore: boolean;
|
||||
_inkBar: MatInkBar;
|
||||
_labelWrappers: QueryList<MatTabLabelWrapper>;
|
||||
_nextPaginator: ElementRef<HTMLElement>;
|
||||
_previousPaginator: ElementRef<HTMLElement>;
|
||||
_showPaginationControls: boolean;
|
||||
_tabList: ElementRef;
|
||||
_tabListContainer: ElementRef;
|
||||
@@ -129,14 +131,21 @@ export declare class MatTabHeader extends _MatTabHeaderMixinBase implements Afte
|
||||
_getLayoutDirection(): Direction;
|
||||
_getMaxScrollDistance(): number;
|
||||
_handleKeydown(event: KeyboardEvent): void;
|
||||
_handlePaginatorClick(direction: ScrollDirection): void;
|
||||
_handlePaginatorPress(direction: ScrollDirection): void;
|
||||
_isValidIndex(index: number): boolean;
|
||||
_onContentChanges(): void;
|
||||
_scrollHeader(scrollDir: ScrollDirection): void;
|
||||
_scrollHeader(direction: ScrollDirection): {
|
||||
maxScrollDistance: number;
|
||||
distance: number;
|
||||
};
|
||||
_scrollToLabel(labelIndex: number): void;
|
||||
_setTabFocus(tabIndex: number): void;
|
||||
_stopInterval(): void;
|
||||
_updateTabScrollPosition(): void;
|
||||
ngAfterContentChecked(): void;
|
||||
ngAfterContentInit(): void;
|
||||
ngAfterViewInit(): void;
|
||||
ngOnDestroy(): void;
|
||||
updatePagination(): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user