Skip to content

Commit 999cb57

Browse files
crisbetommalerba
authored andcommitted
refactor(tooltip): remove 6.0.0 deletion targets (#10344)
Removes the deletion targets for 6.0.0 from the `material/tooltip` entry point. BREAKING CHANGES: * `tooltip-position` which was deprecated in 5.0.0 has been removed. Use `matTooltipPosition` instead. * The `_defaultOptions` parameter in the `MatTooltip` constructor is now required.
1 parent a403bac commit 999cb57

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

src/lib/tooltip/tooltip.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,11 @@ export class MatTooltip implements OnDestroy {
142142
}
143143
}
144144

145-
/**
146-
* @deprecated
147-
* @deletion-target 6.0.0
148-
*/
149-
@Input('tooltip-position')
150-
get _positionDeprecated(): TooltipPosition { return this._position; }
151-
set _positionDeprecated(value: TooltipPosition) { this._position = value; }
152-
153145
/** The default delay in ms before showing the tooltip after show is called */
154-
@Input('matTooltipShowDelay') showDelay =
155-
this._defaultOptions ? this._defaultOptions.showDelay : 0;
146+
@Input('matTooltipShowDelay') showDelay = this._defaultOptions.showDelay;
156147

157148
/** The default delay in ms before hiding the tooltip after hide is called */
158-
@Input('matTooltipHideDelay') hideDelay =
159-
this._defaultOptions ? this._defaultOptions.hideDelay : 0;
149+
@Input('matTooltipHideDelay') hideDelay = this._defaultOptions.hideDelay;
160150

161151
private _message = '';
162152

@@ -204,10 +194,7 @@ export class MatTooltip implements OnDestroy {
204194
@Inject(MAT_TOOLTIP_SCROLL_STRATEGY) private _scrollStrategy,
205195
@Optional() private _dir: Directionality,
206196
@Optional() @Inject(MAT_TOOLTIP_DEFAULT_OPTIONS)
207-
private _defaultOptions?: MatTooltipDefaultOptions) {
208-
209-
// TODO(crisbeto): make the `_defaultOptions` a required param next time we do breaking changes.
210-
// @deletion-target 6.0.0
197+
private _defaultOptions: MatTooltipDefaultOptions) {
211198

212199
const element: HTMLElement = _elementRef.nativeElement;
213200

@@ -306,7 +293,7 @@ export class MatTooltip implements OnDestroy {
306293

307294
/** Handles the touchend events on the host element. */
308295
_handleTouchend() {
309-
this.hide(this._defaultOptions ? this._defaultOptions.touchendHideDelay : 1500);
296+
this.hide(this._defaultOptions.touchendHideDelay);
310297
}
311298

312299
/** Create the overlay config and position strategy */

0 commit comments

Comments
 (0)