busqueda por discoteca e ignore case

This commit is contained in:
onsaliyo 2021-06-04 18:23:44 +02:00
parent e9fbef0cac
commit 3ac8a6da00
2 changed files with 7 additions and 2 deletions

View File

@ -7,7 +7,7 @@
<ion-content>
<ion-grid>
<ion-row class="searchbar">
<ion-input class="text" id="filtro"></ion-input>
<ion-input class="text" id="filtro" aria-placeholder="evento o discoteca"></ion-input>
<ion-button (click)="filtrarEventos()"><ion-icon name="search-outline"></ion-icon></ion-button>
</ion-row>
<ion-row>

View File

@ -72,7 +72,12 @@ export class FeedPage implements OnInit {
cumpleFiltro(evento: Eventoi, filtro: string){
if(evento.nombre.includes(filtro)){
if(evento.nombre.toLowerCase().includes(filtro.toLowerCase())){
return true;
}
if (this.discotecas[this.idsDiscoteca.indexOf(evento.discotecaID)]
.nombre.toLowerCase().includes(filtro.toLowerCase())){
return true;
}