Tener una lista de tiempos, en mayúsculas. ¿Cómo puedo hacer para encontrarlos si el texto de entrada está en minúsculas?
Ej: Barcelona, cuando ingrese "bar", encuéntrelo. Prueba con .lowercase() pero no funciona
onSearch(text){ if(text){ const filter_data=this.old_locations.filter((element) => element.title.includes(text)); this.locations=filter_data; }else{ this.locations=this.old_locations; } }Qué tal esto
this.locations = text ? this.old_locations .filter(element => element.title.toLowerCase().includes(text.toLowerCase())) : this.old_locations;Ahorre algunos ciclos poniendo primero el texto en minúsculas