Skip to content

Commit 7e5f499

Browse files
committed
fix(tab-nav-bar): ripples still showing up when globally disabled
* If someone disables the ripples globally using the `MAT_RIPPLE_GLOBAL_OPTIONS`, the `<mat-tab-nav-bar>` still shows ripples. Ripples should be disabled for that custom `RippleTarget` as well. * By cloning and reinstalling the whole project, I ran into a runtime exception when running Gulp Fixes #11847
1 parent 93b5e89 commit 7e5f499

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/lib/tabs/tab-nav-bar/tab-nav-bar.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ export class MatTabLink extends _MatTabLinkMixinBase
189189
/** Reference to the RippleRenderer for the tab-link. */
190190
protected _tabLinkRipple: RippleRenderer;
191191

192+
/** Whether the ripples are globally disabled through the RippleGlobalOptions */
193+
private _ripplesGloballyDisabled = false;
194+
192195
/** Whether the link is active. */
193196
@Input()
194197
get active(): boolean { return this._isActive; }
@@ -210,7 +213,8 @@ export class MatTabLink extends _MatTabLinkMixinBase
210213
* @docs-private
211214
*/
212215
get rippleDisabled(): boolean {
213-
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple;
216+
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple ||
217+
this._ripplesGloballyDisabled;
214218
}
215219

216220
constructor(private _tabNavBar: MatTabNav,
@@ -227,6 +231,7 @@ export class MatTabLink extends _MatTabLinkMixinBase
227231
this.tabIndex = parseInt(tabIndex) || 0;
228232

229233
if (globalOptions) {
234+
this._ripplesGloballyDisabled = !!globalOptions.disabled;
230235
this.rippleConfig = {
231236
terminateOnPointerUp: globalOptions.terminateOnPointerUp,
232237
speedFactor: globalOptions.baseSpeedFactor,

tools/gulp/tasks/screenshots.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function setFileResult(database: Database, prNumber: string, fileName: string, r
8989

9090
/** Sets the full diff result for the current Pull Request that runs inside of Travis. */
9191
function setPullRequestResult(database: Database, prNumber: string, result: boolean) {
92-
return getPullRequestRef(database, prNumber).child('result').child(pullRequestSha).set(result);
92+
return getPullRequestRef(database, prNumber).child('result').child(pullRequestSha!).set(result);
9393
}
9494

9595
/** Returns the Firebase Reference that contains all data related to the specified PR. */

0 commit comments

Comments
 (0)