I am trying to create an input field that expands at least in width dynamically with the length of the string the user entered, probably even multiline.
Is that possible with an input element in Angular Material 2?
With the textarea field from Angular Material 2 I only managed to expand the textarea in height, not in width with the following code:
<mat-form-field (keydown.enter)="onEnter()"
floatPlaceholder="never">
<textarea matInput
placeholder="Autosize textarea"
matTextareaAutosize
matAutosizeMinRows="1"
matAutosizeMaxRows="8">
</textarea>
</mat-form-field>
In case of the textarea the scrollbar should be invisible or replaced by a smaller one. And most important pressing Enter should not create a new line but trigger an action only.
textarea.