Topic: mdb-autocompleter scroll no working
Comunicaciones pro asked 6 years ago
Good Afternoon, 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.
http://s2.subirimagenes.com/otros/previo/thump_98905711.jpg
http://s2.subirimagenes.com/otros/previo/thump_98905732.jpg
http://s2.subirimagenes.com/otros/previo/thump_98905743.jpg
http://s2.subirimagenes.com/otros/previo/thump_98905784.jpg
@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();
});
}
Arkadiusz Idzikowski staff answered 6 years ago
Hello,
Thank you for letting us know about this problem, we will take a closer look at it.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 7.4.2
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: Yes