mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(tab-nav-bar): ripples still showing up when globally disabled (#11865)
This commit is contained in:
committed by
Joey Perrott
parent
c3fdc32445
commit
fc1d1a4840
@@ -189,6 +189,9 @@ export class MatTabLink extends _MatTabLinkMixinBase
|
||||
/** Reference to the RippleRenderer for the tab-link. */
|
||||
protected _tabLinkRipple: RippleRenderer;
|
||||
|
||||
/** Whether the ripples are globally disabled through the RippleGlobalOptions */
|
||||
private _ripplesGloballyDisabled = false;
|
||||
|
||||
/** Whether the link is active. */
|
||||
@Input()
|
||||
get active(): boolean { return this._isActive; }
|
||||
@@ -210,7 +213,8 @@ export class MatTabLink extends _MatTabLinkMixinBase
|
||||
* @docs-private
|
||||
*/
|
||||
get rippleDisabled(): boolean {
|
||||
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple;
|
||||
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple ||
|
||||
this._ripplesGloballyDisabled;
|
||||
}
|
||||
|
||||
constructor(private _tabNavBar: MatTabNav,
|
||||
@@ -227,6 +231,7 @@ export class MatTabLink extends _MatTabLinkMixinBase
|
||||
this.tabIndex = parseInt(tabIndex) || 0;
|
||||
|
||||
if (globalOptions) {
|
||||
this._ripplesGloballyDisabled = !!globalOptions.disabled;
|
||||
// TODO(paul): Once the speedFactor is removed, we no longer need to copy each single option.
|
||||
this.rippleConfig = {
|
||||
terminateOnPointerUp: globalOptions.terminateOnPointerUp,
|
||||
|
||||
@@ -89,7 +89,7 @@ function setFileResult(database: Database, prNumber: string, fileName: string, r
|
||||
|
||||
/** Sets the full diff result for the current Pull Request that runs inside of Travis. */
|
||||
function setPullRequestResult(database: Database, prNumber: string, result: boolean) {
|
||||
return getPullRequestRef(database, prNumber).child('result').child(pullRequestSha).set(result);
|
||||
return getPullRequestRef(database, prNumber).child('result').child(pullRequestSha!).set(result);
|
||||
}
|
||||
|
||||
/** Returns the Firebase Reference that contains all data related to the specified PR. */
|
||||
|
||||
Reference in New Issue
Block a user