There is an example of FlatTreeControl with possibility to dynamically add new node https://v15.material.angular.io/components/tree/examples#tree-checklist
I want to add Cancel button for input field but without any success.
I've tried
<mat-form-field #myFormField>
<input matInput placeholder="Input">
</mat-form-field>
<button (click)="myFormField.close()">Close</button>
but got different errors:
TS2339: Property 'close' does not exist on type 'MatFormField'
TS2339: Property 'close' does not exist on type 'MatFormFieldControl '.
TS2339: Property 'blur' does not exist on type 'MatInput'.
How to add a Cancel button for input field in this example?
Optional question: How to add a protection from opening multiply input fields?