1

I use this code to make a dropdown with an input to search and list items from an array ..

  <input list="homebox_id" formControlName="homebox_id"/>
  <datalist id="homebox_id"
    [ngClass]="{invalid: invalidInputs}">
    <option *ngFor="let homebox of homeboxs" value="{{homebox.homebox_id}}">{{homebox.serial_number}}</option>
  </datalist>

all is good except this code does not display serial_number but it displays the value i want to send "homebox_id"...What can i do to display the text i want?

Aldo Abazi
  • 275
  • 2
  • 5
  • 12

0 Answers0