Harvest-Dev / ng-select2

A select2 for Angular
MIT License
52 stars 32 forks source link

noResultMessage is not a known property of select2. #44

Closed JoybasakQumaOne closed 1 year ago

JoybasakQumaOne commented 1 year ago

I am using version 7.3.1. When my search result is empty it doesn't show the "No result found" message, throws a console error instead

<select2 [data]="data2" [value]="_sectionMetadata.Metadata.Value"
                                    [(ngModel)]="_sectionMetadata.Metadata.Value" [ngModelOptions]="{standalone: true}"
                                    (open)="openSelect(_sectionMetadata.Metadata, $event)"
                                    [placeholder]="_sectionMetadata.Metadata.ItemValue==null ? ' -- Select  ' +_sectionMetadata.Metadata.LabelName+ ' --' : _sectionMetadata.Metadata.ItemValue.Value"
                                    (search)="search('search1', $event)"
                                    (update)="update(_sectionMetadata.Metadata, $event)"
                                    [disabled]="!_sectionMetadata.IsEditable"
                                    [customSearchEnabled]="!_sectionMetadata.Metadata.IsStaticLookUp"
                                    [listPosition]="auto"
                                    [minCountForSearch]="10"
                                    [noResultMessage]="No result found"
                                    > 
                                  </select2>
Zefling commented 1 year ago

No [] for string parameters

<select2 [data]="data2" [value]="_sectionMetadata.Metadata.Value"
                                    [(ngModel)]="_sectionMetadata.Metadata.Value" [ngModelOptions]="{standalone: true}"
                                    (open)="openSelect(_sectionMetadata.Metadata, $event)"
                                    [placeholder]="_sectionMetadata.Metadata.ItemValue==null ? ' -- Select  ' +_sectionMetadata.Metadata.LabelName+ ' --' : _sectionMetadata.Metadata.ItemValue.Value"
                                    (search)="search('search1', $event)"
                                    (update)="update(_sectionMetadata.Metadata, $event)"
                                    [disabled]="!_sectionMetadata.IsEditable"
                                    [customSearchEnabled]="!_sectionMetadata.Metadata.IsStaticLookUp"
                                    listPosition="auto"
                                    minCountForSearch="10"
                                    noResultMessage="No result found"
                                    > 
                                  </select2>