Skip to content

textarea not manually resizable via resizeToFitContent method #2419

Closed
@mark-langer

Description

@mark-langer

Bug, feature request, or proposal:

Bug

What is the expected behavior?

According to the API, one should be able to call the method resizeToFitContent on the MdTextareaAutosize directive to manually trigger an auto-resize of the textarea that is labeled with md-autosize.

Since you have to declare a handle for the directive through a template variable, e. g. #myTextareaAutosizeDirective="mdTextareAutosize", to call any methods on it, the MdTextareaAutosize directive should have a decorator property exportAs defined.

What is the current behavior?

If you try to assign the directive to a template variable, an error is thrown. I assume this error occurs because of the directive's missing exportAs decorator property mentioned above.

The error reads: There is no directive with "exportAs" set to "mdTextareaAutosize"

What are the steps to reproduce?

This plunker shows the use case.

This plunker includes the template variable assignment that throws the error.

What is the use-case or motivation for changing an existing behavior?

In our app, we insert text into the textarea through a function which does not trigger the change event of the textarea that is normally used for resizing.

Which versions of Angular, Material, OS, browsers are affected?

beta.0

Is there anything else we should know?

Nope.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions