@@ -49,7 +49,7 @@ export class CdkCombobox<T = unknown> implements OnDestroy, AfterContentInit {
49
49
private _panel : CdkComboboxPanel < T > | undefined ;
50
50
51
51
@Input ( )
52
- value : T | T [ ] ;
52
+ value : T ;
53
53
54
54
@Input ( )
55
55
get disabled ( ) : boolean { return this . _disabled ; }
@@ -68,7 +68,7 @@ export class CdkCombobox<T = unknown> implements OnDestroy, AfterContentInit {
68
68
@Output ( 'comboboxPanelOpened' ) readonly opened : EventEmitter < void > = new EventEmitter < void > ( ) ;
69
69
@Output ( 'comboboxPanelClosed' ) readonly closed : EventEmitter < void > = new EventEmitter < void > ( ) ;
70
70
@Output ( 'panelValueChanged' )
71
- readonly panelValueChanged : EventEmitter < T | T [ ] > = new EventEmitter < T | T [ ] > ( ) ;
71
+ readonly panelValueChanged : EventEmitter < T > = new EventEmitter < T > ( ) ;
72
72
73
73
private _overlayRef : OverlayRef ;
74
74
private _panelContent : TemplatePortal ;
@@ -137,7 +137,7 @@ export class CdkCombobox<T = unknown> implements OnDestroy, AfterContentInit {
137
137
return ! ! this . panel ;
138
138
}
139
139
140
- private _setComboboxValue ( value : T | T [ ] ) {
140
+ private _setComboboxValue ( value : T ) {
141
141
const valueChanged = ( this . value !== value ) ;
142
142
this . value = value ;
143
143
@@ -147,14 +147,9 @@ export class CdkCombobox<T = unknown> implements OnDestroy, AfterContentInit {
147
147
}
148
148
}
149
149
150
- private _setTextContent ( content : T | T [ ] ) {
150
+ private _setTextContent ( content : T ) {
151
151
const contentArray = coerceArray ( content ) ;
152
- const contentString = '' ;
153
- for ( const token of contentArray ) {
154
- contentString . concat ( `${ token } ` ) ;
155
- }
156
-
157
- this . _elementRef . nativeElement . textContent = contentString ;
152
+ this . _elementRef . nativeElement . textContent = contentArray . join ( ' ' ) ;
158
153
}
159
154
160
155
private _getOverlayConfig ( ) {
0 commit comments