@@ -34,15 +34,21 @@ import { ComboBoxMode, ComboBoxOption, ComboBoxResult } from './combo-box-api';
3434 }
3535 ] ,
3636 template : `
37- <ht-popover (popoverOpen)="this.onPopoverOpen($event)" (popoverClose)="this.onPopoverClose()" class="combo-box">
37+ <ht-popover
38+ class="combo-box"
39+ [disabled]="this.disabled"
40+ (popoverOpen)="this.onPopoverOpen($event)"
41+ (popoverClose)="this.onPopoverClose()"
42+ >
3843 <ht-popover-trigger>
3944 <div
4045 #trigger
4146 class="popover-trigger"
4247 [ngClass]="{
4348 input: this.mode === '${ ComboBoxMode . Input } ',
4449 chip: this.mode === '${ ComboBoxMode . Chip } ',
45- 'show-border': this.showBorder
50+ 'show-border': this.showBorder,
51+ disabled: this.disabled
4652 }"
4753 [class.has-text]="this.text"
4854 [class.input-focused]="input.matches(':focus')"
@@ -79,6 +85,7 @@ import { ComboBoxMode, ComboBoxOption, ComboBoxResult } from './combo-box-api';
7985
8086 <!-- Clear Button -->
8187 <div
88+ *ngIf="!this.disabled"
8289 [class.has-text]="this.text"
8390 [class.input-focused]="input.matches(':focus')"
8491 [ngClass]="this.mode"
@@ -427,6 +434,10 @@ export class ComboBoxComponent<TValue = string> implements AfterViewInit, OnChan
427434 } ) ;
428435 }
429436
437+ public setDisabledState ( isDisabled ?: boolean ) : void {
438+ this . disabled = isDisabled ?? false ;
439+ }
440+
430441 private propagateValueChangeToFormControl ( value ?: string ) : void {
431442 this . propagateControlValueChange ?.( value ) ;
432443 this . propagateControlValueChangeOnTouch ?.( value ) ;
0 commit comments