mdb-select noOptionsFound issues


Topic: mdb-select noOptionsFound issues

mr.Jelle-Beat asked 6 years ago

I'm currently trying to get the <mdb-select> to work with the noOptionsFound event. The template is as follows:
<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 6 years ago

Dear mr.Jelle-Beat, Thanks for your report. It's a bug. I'm adding this to our bugs list, and we'll fix this in the future. Unfortunately, for now I cannot provide you with ETA. Best Regards, Damian

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB 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