Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

304
Views
Vuetify search in v-autocomplete with property item-text or another property?

I've a Todo list which is an array of objects with properities (id, title, description) Also I want to display title in v-autocomplete but when I do search for word it's fine, but what I want is Doing search for description or title.
For Example: if I type programming, it will display to me Read books.

Template

 <v-autocomplete
    v-model="idTodo"
    :items="todos"
    label="search todo..."
    item-value="id"
    item-text="title"
  />

Script

    visitCategories: [],
    todos: [
      { id: 1, title: "Read books", description: "read books related to programming" },
      {
        id: 2,
        title: "watch tutorials",
        description: "watch tutorials in many platforms like Youtube, Udemy...",
      },
    ],
    idTodo: -1,
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Solution is to bind a custom filter.

    <v-autocomplete
    v-model="idTodo"
    :items="todos"
    label="search todo..."
    :filter="filterData"
    item-value="id"
  />

And then define the 'filterData' function in methods properties.

    methods: {
    filterData(item, queryText) {
      return (
        item.title.toLowerCase().includes(queryText.toLowerCase()) ||  
        item.description.toLowerCase().includes(queryText.toLowerCase())
      );
    }
  }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!