| 136 | readonly inputElement!: HTMLInputElement; |
| 137 | |
| 138 | constructor() { |
| 139 | const defaultOptions = inject<MatChipsDefaultOptions>(MAT_CHIPS_DEFAULT_OPTIONS); |
| 140 | const formField = inject<MatFormField>(MAT_FORM_FIELD, {optional: true}); |
| 141 | |
| 142 | this.inputElement = this._elementRef.nativeElement as HTMLInputElement; |
| 143 | this.separatorKeyCodes = defaultOptions.separatorKeyCodes; |
| 144 | this.disabledInteractive = defaultOptions.inputDisabledInteractive ?? false; |
| 145 | |
| 146 | if (formField) { |
| 147 | this.inputElement.classList.add('mat-mdc-form-field-input-control'); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | ngOnChanges() { |
| 152 | this._chipGrid.stateChanges.next(); |