Topic: Autocomplete with Remote Data Source

maenthoven pro asked 5 years ago


Are there any demos for the new autocomplete from a remote data source, with objects as the end output?

I'm trying to make a "Author Search" component. This is an autocomplete component that binds to an Author. Authors have the structure of {id: number; name: string;}.

So, I want the user to select an author from the autocomplete dropdown (searching from the server).

When the user selects an author, the [(ngModel)] is now set to that author. ANY changes to the text make it so that the author is voided out.


Arkadiusz Idzikowski staff commented 5 years ago

https://mdbootstrap.com/docs/angular/forms/autocomplete/#remoteData

We use string in our example, however the use of the object should not affect funcionality of the component in any way. Could you provide some html/ts code on which we will be able to reproduce this problem?



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.3.0
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No