Search a list while typing in textbox VueJS 2

后端 未结 6 1280
我寻月下人不归
我寻月下人不归 2021-02-04 15:00

I have a list of users from an array. And I want to filter them based on the search box(name) at the top. I saw that there are filters in VueJS 1. But not available in VuesJS 2.

6条回答
  •  感情败类
    2021-02-04 15:19

    `computed: {
        filteredResources(){
             return this.Surveyors.filter((surveyor)=>{
             return surveyor.Name.toLowerCase().match(this.searchQuery.toLowerCase());  
             })
          }
        }`
    

    /Surveyors is data table name and surveyor is its index like in your example you are having customer in customers/

提交回复
热议问题