search array in vue

Solutions on MaxInterview for search array in vue by the best coders in the world

showing results for - "search array in vue"
Camilla
26 Aug 2020
1data: {
2    searchTerm: "",
3    postList: [
4        { "title": "String" }
5        ...
6    ],
7},
8computed: {
9    filteredList() {
10        return this.postList.filter(post => {
11            return post.title.toLowerCase().includes(this.searchTerm.toLowerCase())
12        })
13    }
14}