Created
April 4, 2024 21:26
-
-
Save dario61081/95c1cdc599bd48f51dcce59cd9c2a400 to your computer and use it in GitHub Desktop.
como filtrar registros multiples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
computed: { | |
filtered_list(){ | |
if (!this.filter){ | |
return this.proveedores; | |
} | |
function filter01(item, filter){ | |
return item.razon_social?.toString().toLowerCase().includes(filter); | |
} | |
function filter02(item, filter){ | |
return item.ruc?.toString().toLowerCase().includes(filter) | |
} | |
return this.proveedores.filter(item => { | |
return filter01(item, this.filter) || filter02(item, this.filter) | |
}); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment