Topic: Autocomplete search looks for value in datasource before it has been updated
UoStA_ajdi pro asked 6 years ago
So the issue here is that when i type something in the input it looks for it in the local datasource which has not been updated because it is still fetching data from the backend.
Now, once i have the source populated my next searches will start looking for items in the existing source instead of waiting for the source to be re-populated.
Is there a way to call the lookup manually after the source have been populated?
<mdb-autocomplete [label]="'Line manager'" name="lineManager" [(ngModel)]="lineManagerStr" [datasource]="lineManagers" (keyup)="subscribeToProfileSearch()"> </mdb-autocomplete>
this.appService.getObject('searchProfile/' + this.lineManagerStr).subscribe(data => { this.lineManagers = this.completerService.local(data, 'label', 'label'); });Another behavior: it calls the onkeyup callback twice for each keypress. Also i am using the version 6.2.3 but the support dropdown does not have that option.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Open
Specification of the issue
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.2
- Device: PC
- Browser: Firefox
- OS: Windows
- Provided sample code: No
- Provided link: No
Tags
Related topics
Damian Gemza staff commented 6 years ago
Dear UoStA_ajdi, Could you please provide me with a reproduction example, on which I'll be able to reproduce your problem? This would help me a lot. If it's possible, please send it to me at d.gemza@mdbootstrap.com Best Regards, Damian