Answers for "search array in vue"

0

search array in vue

data: {
    searchTerm: "",
    postList: [
        { "title": "String" }
        ...
    ],
},
computed: {
    filteredList() {
        return this.postList.filter(post => {
            return post.title.toLowerCase().includes(this.searchTerm.toLowerCase())
        })
    }
}
Posted by: Guest on November-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language