File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
projects/angular/components/ui-grid/src/filters Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ export class UiGridDropdownFilterDirective<T> extends UiGridFilterDirective<T> i
5252 *
5353 */
5454 @Input ( )
55- set items ( value : IDropdownOption [ ] ) {
56- this . _items = value ;
57- this . suggestItems = value . map ( ( item , idx ) => ( {
55+ set items ( value : IDropdownOption [ ] | null ) {
56+ this . _items = value ?? [ ] ;
57+ this . suggestItems = this . _items . map ( ( item , idx ) => ( {
5858 id : idx + 1 ,
5959 text : item . label ,
6060 data : item . value ,
@@ -119,7 +119,7 @@ export class UiGridDropdownFilterDirective<T> extends UiGridFilterDirective<T> i
119119 */
120120 suggestItems : ISuggestDropdownValueData [ ] = [ ] ;
121121
122- private _items ? : IDropdownOption [ ] ;
122+ private _items : IDropdownOption [ ] = [ ] ;
123123 private _value : FilterDropdownPossibleOption ;
124124 private _multi = false ;
125125
@@ -155,7 +155,7 @@ export class UiGridDropdownFilterDirective<T> extends UiGridFilterDirective<T> i
155155 }
156156
157157 findDropDownOptionBySuggestValue ( suggestValue : ISuggestDropdownValueData ) {
158- return this . items . find ( item => isEqual ( item . value , suggestValue . data ) ) ;
158+ return this . _items . find ( item => isEqual ( item . value , suggestValue . data ) ) ;
159159 }
160160
161161 get hasValue ( ) {
You can’t perform that action at this time.
0 commit comments