Topic: mdb-autocompleter scroll no working
Diego Alvarez asked 6 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.
Diego Alvarez answered 6 years ago
Diego Alvarez answered 6 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();
});
}
Damian Gemza staff answered 6 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
Comunicaciones pro answered 6 years ago
Arkadiusz Idzikowski staff answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: 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