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

82
Views
how to render html content in vue multiselect options list in Vue Js

I want to render that HTML content into options list so need help in resolving this issue.

HTML

<Multiselect
                    v-model="radiologyTests"
                    mode="tags"
                    placeholder="Choose your stack"
                    :close-on-select="false"
                    :filter-results="true"
                    :min-chars="1"
                    :resolve-on-load="false"
                    :delay="0"
                    :searchable="true"
                    :options="async function(query) {
                        return await fetchLanguages(query) // check JS block for implementation
                   }">
</Multiselect>

Method

async fetchLanguages(query){
         var resData = [];
        await axios.post(this.route("searchRadiologyTests"),{search:query}).then(function(response){
              for( var i in response.data){
                resData.push(response.data[i]);
            }
         });
        console.log(resData);
        return resData.map((item) => {
         item.test_name.replace(new RegExp(query, "gi"), (match) => `<span style='color:red'>${match}</span>`)
        return { value: item.id, label:item.test_name }
        })
    },

Any help will be highly appreciable. Thanks

about 4 years ago · Juan Pablo Isaza
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!