Angular Autocomplete, autocomplete is not performed correctly when adding more elements

-1

Since a few days ago I come with this problem, but I have not yet managed to find the solution. I am using myControl [index] so that the data is not repeated when adding more inputs. The problem is that in the first input does the autocompletado correctly, but no clutch to add more inputs and I do not work autocompletado. I hope someone can help me with this, I will be very grateful.

I leave the Link here link

    
asked by Quispe Flores Liam Franki 17.12.2018 в 23:59
source

1 answer

0

    listUsers:Array<any>;

cuando envias parametros se hace de la siguiente manera

busquedaDescripcionProductoAutocompletado() {
let descripcion= '';
    const index = this.arregloCuadroTextoDescripcionDetalle.findIndex(indice => indice.value === descripcion);
    this.myControl[index].valueChanges.subscribe(descripcionUser => {
  descripcion=descripcionUser;
        this.userService.listUsers(descripcion).subscribe(response => {
          this.listUsers = response['data'];
        }, error => {
    console.log('Error del servidor. Por favor contácte con soporte o intente más tarde.');
        });
    });
  }
    
answered by 03.01.2019 / 16:22
source