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

134
Views
Filter a Component from a textbox VueJS

Can we show and hide a component based on textbox value? I saw v-if can do conditional rendering, but when textbox is null, nothing appear. And when i any character, both appear

What i want is just filter specific components

<template>
<input type="text" v-model="search">
<ul>
  <li><ComponentA v-if="search.includes('ComponentA') || search.length == 0" /></li>
  <li><ComponentB v-if="search.includes('ComponentB') || search.length == 0" /></li>
</ul>
</template>
<script setup>
  import ComponentA from '../components/ComponentA.vue'
  import ComponentB from '../components/ComponentB.vue'
  import {ref} from 'vue'
  
  let search = ref('')
</script>
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!