Topic: mdb-select noOptionsFound issues
mr.Jelle-Beat
asked 3 years ago
<mdb-select [filterEnabled]="true" [(ngModel)]="myModel" [notFoundMsg]="'no matches found'" [options]="availableOptions" (noOptionsFound)="noOptionsevent($event)" ></mdb-select>I expect the (noOptionsFound)="noOptionsevent($event)" to fire as soon as the filter causes none of the available options to be displayed. As shown here. However this is not the case. The noOptionsevent(event) {} gets called on every keystroke in the filter. Even if there are a lot of options matching the filter. Is this a bug? Am I doing something wrong? Below is the TypeSript I used
availableOptions: Array<any> = [
{ value: '1', label: "Option1"},
{ value: '2', label: "Option2"},
{ value: '3', label: "Option3"},
{ value: '4', label: "Option4"},
{ value: '5', label: "Option5"},
{ value: '6', label: "Option6"},
{ value: '7', label: "Option7"},
{ value: '8', label: "Option8"},
{ value: '9', label: "Option9"},
{ value: '10', label: "Option10"},
];
myModel = '0';
noOptionsevent(event) {
console.log(event);
}
I'm using the ng-uikit-pro-standard-6.1.4 package.
I really hope you can help me out!
Yours, Jelle
Damian Gemza
staff answered 3 years ago
Closed
This topic is closed.
Closed
- User: Free
- Premium support: No
- Technology: Angular
- MDB Version: 6.1.4
- Device: Desktop and Mobile
- Browser: Chrome, Firefox, Edge, IE11
- OS: Windows and Android
- Provided sample code: Yes
- Provided link: Yes