You can now filter not only by name, but also description, url etc- awesome

This commit is contained in:
Alicia Sykes 2019-08-24 16:43:12 +01:00
parent c7308a2909
commit 5e56e0c3c7
1 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,10 @@ export default {
}, },
filterTiles (allTiles) { filterTiles (allTiles) {
return allTiles.filter(tile => { return allTiles.filter(tile => {
return tile.title.toLowerCase().includes(this.searchTile.toLowerCase()) const searchTerm = this.searchTile.toLowerCase()
return tile.title.toLowerCase().includes(searchTerm) ||
tile.description.toLowerCase().includes(searchTerm) ||
tile.url.toLowerCase().includes(searchTerm)
}) })
} }
}, },