Well, I'm having problems with my application. The idea would be: I type a client in the search bar, it traverses the vector, brings its clients in a list. So far so good. The problem: When I have two clients with the same initial characters, it brings to the search field (ALWAYS) the last element of the array, even though I choose the first one. Here is the code:
selectClientes(cli: any) {
this.clientesList = this.clientesList.filter((cliente) => {
this.pedido.cliente = cliente.cliente;
this.clientesList = null;
})