Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: mdb-autocompleter scroll no working

Diego Alvarez free asked 5 years ago


When you click on the component's scroll bar, the entry field is undefined. The scroll bar when clicking down or up does not work and you get out of it. This using exactly the same example code and there if it works but in mine no.


Arkadiusz Idzikowski staff answered 5 years ago


Hello,

This problem will be resolved in next MDB Angular version (next monday).


Comunicaciones pro answered 5 years ago


Hi,

I need solution of this problem please


Damian Gemza staff answered 5 years ago


Dear Diego,

Thanks for your report! We'll take care of this, but for now, I cannot provide you some workaround for the undefined situation, because the changes have to be on our side.

Please be patient.

Best Regards,

Damian


Diego Alvarez free answered 5 years ago


@ViewChild(MdbAutoCompleterComponent) completer:   MdbAutoCompleterComponent;
searchText = '';
results: any;
datos: any = ['red', 'green', 'blue', 'cyan', 'magenta', 'yellow', 'black'];
getDataItems() {
  return this.datos;
}

searchEntries(term: string) {
  if(term === undefined || term === null){
   term = "";
}
return of(this.getDataItems().filter((data: any) =>      data.toString().toLowerCase().includes(term.toString().toLowerCase())));
}

getFilteredData() {
   this.results =      this.searchEntries(this.ingresarAfiliadoForm.controls.searchText.value);
console.log(this.results);

}

onChange() {
 this.getFilteredData();
}

ngAfterViewInit() {
   this.getFilteredData();
   this.completer.selectedItemChanged().subscribe((datos: any) => {
   if(datos.text === undefined || datos.text === null){
       datos.text = "";
   }
 this.searchText = datos.text;
 this.getFilteredData();
});
 }

Diego Alvarez free answered 5 years ago



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.4.2
  • Device: PC
  • Browser: Google Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No