MCPcopy Create free account
hub / github.com/angular/components / _setMaxHeight

Method _setMaxHeight

src/cdk/text-field/autosize.ts:146–153  ·  view source on GitHub ↗

Sets the maximum height of the textarea as determined by maxRows.

()

Source from the content-addressed store, hash-verified

144
145 /** Sets the maximum height of the textarea as determined by maxRows. */
146 _setMaxHeight(): void {
147 const maxHeight =
148 this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;
149
150 if (maxHeight) {
151 this._textareaElement.style.maxHeight = maxHeight;
152 }
153 }
154
155 ngAfterViewInit() {
156 if (this._platform.isBrowser) {

Callers 2

maxRowsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected